**DONOTDELETE**
(Unregistered)
10/18/05 07:37 AM
Re: macosx

here how I compiled it under MacOSX 10.3.9:
1) create the java class
javac -classpath . com/softtechdesign/math/MathLib.java
2) create the c header
javah -jni -o MathLib.h -classpath . com.softtechdesign.math.MathLib
3) compile the c library note that jni libraries have to be named lib<yourLibHere>.jnilib
cc -dynamiclib -std=gnu99 -I /Library/Java/home/include Math.c -current_version 1.0 -compatibility_version 1.0 -o libMathLib.jnilib
4) e voila now you can run the program
java -classpath . com.softtechdesign.math.MathLib

this worked for me.



Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.