I have an existing java code and I want to use its function in c language. As I found till now I should use jni. I have read a sample in this link:
Java programming with JNI
If I want to compile the c code with the command below I have to change the code a little.Because of the last sentence that has mentioned in this link:
Re: JNI NIO early compilation error

I use these command to compile:
g++ -framework -I/System/Library/Frameworks/JavaVm.framů -c Sample2.c -o Sample2.o
I got this as result :
i686-apple-darwin10-g++-4.2.1: cannot specify -o with -c or -S with multiple files

and it doesn't work! and I don't know how should I compile and run it.:-(
and I even know what's wrong with that!
Can you please put any comment on this ? Or do you know another way to do what I'm going to do.