Maltalex changed the title Gradle fails to detect version of OpenJDJ 11.0.2 Gradle fails to detect version of OpenJDK 11.0.2 Mar 3, 2019 This comment has been minimized. Sign in to view.
I have been trying to figure out why my OpenJDK 11 installation can't run JAR files compiled at class level 55. I even went so far as to completely remove Java from my system and reinstall. I am running Ubuntu 18.04.1 LTS. Here are my steps for installing OpenJDK 11:
sudo apt-get install openjdk-11-jdk-headless
Once installed, my version shows the following:
ryan@aurelius:~$ java -versionopenjdk version '10.0.2' 2018-07-17OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
And if I try to run a JAR file compiled with the same Java version, I get this:
ryan@aurelius:~/jade$ java -jar jade-launcher-jar-with-dependencies.jar -iError: LinkageError occurred while loading main class com.vicinityconcepts.jade.launcher.JadeOrbitBootstrap java.lang.UnsupportedClassVersionError: com/vicinityconcepts/jade/launcher/JadeOrbitBootstrap has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0
What am I doing wrong?
SOLUTION
As stated in the comments, seems to be an issue with the OpenJDK packages in Ubuntu 18.04. After upgrading to 18.10, the package contains the correct JDK version.
RyanPalmerRyanPalmer
1 Answer
As stated in the comments, seems to be an issue with the OpenJDK packages in Ubuntu 18.04. After upgrading to 18.10, the package contains the correct JDK version.
RyanPalmerRyanPalmer