Can any on help me to fin find my javac and jni.h in java 11?

267 views Asked by At

Im working on the new release of a software who moves from java 8 to java 11. I have installed both javas. In my .bashrc file i have the following lines for when im working with java 8:

  • export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
  • export PATH=$JAVA_HOME/bin:$PATH
  • export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib:$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH

when im working with java 11:

  • export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
  • export PATH=$JAVA_HOME/bin:$PATH
  • export LD_LIBRARY_PATH=$JAVA_HOME/:$JAVA_HOME/lib:$JAVA_HOME/lib/server:$LD_LIBRARY_PATH

And I after comment or un-comment those lines (when changing between javas) I use:

  • sudo update-alternatives --config java To change java default

But i can't use

  • sudo update-alternatives --config javac because I dont know where is javac

All of these is just the debugging of finding where is my JNI_VERSION_10, because in the software in which im working, when running the following line

  • vm_args.version = JNI_VERSION_10; it returns me

invoke.c:163:20: error: 'JNI_VERSION_10' undeclared (first use in this function); did you mean 'JNI_VERSION_1_6'? 163 | vm_args.version = JNI_VERSION_10; | ^~~~~~~~~~~~~~ | JNI_VERSION_1_6

Thanks for any help!!!!

1

There are 1 answers

0
bencomo On

Well i found my own answer. In java 11, theres no jre directory inside the /usr/lib/jvm/java-{integer}openjdk-amd64/ directory. So, my relatives path were wrong.