0

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 -version openjdk version "10.0.2" 2018-07-17 OpenJDK 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 -i Error: 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.

2
  • This looks like a serious packaging error. That's Java 10, not Java 11. Ubuntu 18.10 actually has Java 11 in its openjdk-11 packages. But 18.04 LTS has packages named openjdk-11 etc., but they actually contain Java 10. Commented Dec 11, 2018 at 3:53
  • @MichaelHampton Thank you, that was it. I upgraded to 18.10 and I received the correct JDK now. Commented Dec 11, 2018 at 22:52

1 Answer 1

0

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.