Unsupported major.minor version 52.0 in ubuntu

后端 未结 4 2066
梦谈多话
梦谈多话 2021-01-18 20:11

I am using jdk1.8.0_25, and when I check the version of Java with the following command:

java -version

it outputs the followin

相关标签:
4条回答
  • 2021-01-18 20:31

    Maybe you have more than one java JDK installed. Try to check that by

    sudo update-alternatives --config javac 
    
    0 讨论(0)
  • 2021-01-18 20:32

    Run the command />which java to determine where the java command is coming from on the path.

    You either need to change to put jdk 1.8 on the path or use the fully qualified path to the java executable.

    0 讨论(0)
  • 2021-01-18 20:34

    You can install several different java versions on to your system. You can set the default using the update-alternatives command.

    Here is a solution to a similiar problem, which is maybe of use for you: https://askubuntu.com/questions/121654/how-to-set-default-java-version

    0 讨论(0)
  • 2021-01-18 20:55

    I got the same error, and while the java version correctly set to 8, my JAVA_HOME env var was still set to 7.

    Executing this fixed it for me:

    export JAVA_HOME=/usr/lib/jvm/java-8-oracle
    
    0 讨论(0)
提交回复
热议问题