1

I am using Linux on Windows subsystem and when I try to run a code, i get the Unsupported major.minor version 52.0. I realize this is due to java version incompatibility.

So I set the JAVA_HOME and PATH as follows:

export JAVA_HOME=/usr/java/jdk1.8.0_101/bin/java
export PATH=$PATH:/usr/java/jdk1.8.0_101/bin

But when i check the java version:

java -version

I get

javac 1.7.0_121

How do i set the java path to the latest java version(1.8)?

Thanks for your help!

  • Try export PATH=/usr/java/jdk1.8.0_101/bin:$PATH – DavidPostill Nov 21 '16 at 22:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.