A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Other JSE/JEE APIs
problem in jni.h
Joined: Mar 05, 2009
Jan 07, 2010 00:23:50
I'm working on jni in linux for that I have to generate the .so file.
But when I use gcc to compile it showing me the following error
error: jni.h: No such file or directory
how to tackle this error.
Joined: Aug 27, 2006
Jan 15, 2010 18:13:26
First you'll need to find your jni.h file.
On my distro, it's at: /usr/lib/jvm/java-6-openjdk/include/jni.h
And then you'll need to add it on the command line to gcc:
gcc -shared -I/usr/lib/jvm/java-6-openjdk/include -I/usr/lib/jvm/java-6-openjdk/include/linux -o libfoo.so foo.c
I agree. Here's the link:
subject: problem in jni.h
jni.h not open - can not compile
New to JNI
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014