I cannot open jalview on linux

Hi all,
I downloaded jalview on ubuntu, but when I want to work with that, it says:

Error: LinkageError occurred while loading main class jalview.bin.Launcher
java.lang.UnsupportedClassVersionError: jalview/bin/Launcher 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

I tried to update my JAVA using this command: sudo apt-get install openjdk-11-jdk

But it returns:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
openjdk-11-jdk is already the newest version (11.0.10+9-0ubuntu1~20.04).
The following packages were automatically installed and are no longer required:
  libfprint-2-tod1 libllvm10
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.

Could you please kindly help?






updated 2 hours ago by




I suspect you have a non-OS-package java installed alongside the openjdk 11 package (perhaps in your own account or in /usr/local) which is appearing in your $PATH (the list of folders looked in for commands) first. This is the Zulu 10.3 java you can see when running java -version. Possibly it might be that the ubuntu /etc/alternatives/java is pointing at the Zulu java.

If you specify a full path to the java 11 binary it should work. To find out where that is try each of these:
/usr/bin/java -version
/usr/lib/jvm/default-java/bin/java -version
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -version
That last one should work for sure, but use the first one that says it's a java 11, let's say /usr/lib/jvm/default-java/bin/java
You should then be able to launch jalview using the conda wrapper script by running (all one line including the spaces)
PATH=/usr/lib/jvm/default-java/bin:$PATH jalview.sh

If you want to make that PATH change more permanent you could put at the end of your ~/.bashrc file the line
export PATH=/usr/lib/jvm/default-java/bin:$PATH

Finally, Java 10 is no longer supported so the Zulu 10.3 could be uninstalled but this will depend on where and how it was installed, beyond the scope of this reply! [also there might just be some other java programme that needs it].
Hope this works!

before adding your answer.

Traffic: 1510 users visited in the last hour

Source link