Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.
moovida
Unregistered
|
|
Great deal, my question is if someone has tried this on a Macosx system. I wasn't able to get the shared lib loaded using -dylib (the -shared of linux doesn't work any more).
|
Anonymous
Unregistered
|
|
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.
|
|
0 registered and 1 anonymous users are browsing this forum.
Moderator:
Print Topic
|
Forum Permissions
You cannot start new topics
You cannot reply to topics
HTML is disabled
UBBCode is enabled
|
Rating:
Topic views: 7333
|
|
|
|
|
|
Powered by UBB.threads™ 6.5.5