how to compile C file to be use on JNI

Joined
Dec 20, 2010
Messages
4
Reaction score
0
hello guys

please help i link this link java-tips.org/other-api-tips/jni/simple-example-of-using-the-java-native-interface.html and i fallow the steps but i have a big problem i dont know how to compile c file it says that to compile c file this is the syntax "cl -Ic:\java\include -Ic:\java\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll" but it does not work.

or may be it because i don't modify the syntax to compile c file please help how to modify "cl -Ic:\java\include -Ic:\java\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll".

I'm using netbeans 6.7.1 and jdk1.6.0_21
C:\Program Files\Java\jdk1.6.0_21\include
C:\Program Files\Java\jdk1.6.0_21\include\win32

i hava a file

1)HelloWorld.java
2)HelloWorld.class
3)HelloWorld.h //where should i put this file? and what should i do to this file?
4)HelloWorld.c //where should i put this file? and what should i do to this file?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top