I am trying to use JNI for my recent project. MY IDE is NetBeans. After creating C/C++ project , I am trying to add JDK directory from project properties->C compiler->include directory. I could not find any include or include/linux directory in /usr/lib/jvm/ directory.
Where should i look for "include" or "include/linux" directory?
OpenJDK 11 is located at /usr/lib/jvm/java-11-openjdk-amd64/bin/java. Oracle Java is located at /usr/lib/jvm/java-11-oracle/jre/bin/java .
Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and in system variable try to find JAVA_HOME. This gives me the jdk folder.
On Ubuntu, it looks like it is in /usr/lib/jvm/java-6-openjdk/ for OpenJDK, and in some other subdirectory of /usr/lib/jvm/ for Suns JDK (and other implementations as well, I think). Debian is the same.
Assuming you've got a JDK installed the directory should be something like: /usr/lib/jvm/java-7-openjdk-amd64
(assuming OpenJDK 7 here). You might also need to a JAVA_HOME
environment variable pointing at the same directory depending on your build process.
If you haven't got a JDK installed you can install the OpenJDK with something like the following in a terminal windows:
sudo apt-get install openjdk-7-jdk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With