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.
Probably you have openjdk-11-java version that supports class 44, not 45. I see that there is a request on web in 2018 to update it to 45 from 44. You can use openjdk ppas to update the jdk. But be careful before adding ppa. Look at this https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa and see adding it will update system openjdk-11-jdk and helps in launching the jalview. Or you can use an earlier version of Jalview (assuming that it would use <45class file). Please also post linux distribution you are using next time.
Hi h.gaikani, I'm a Jalview developer who develops on linux (kubuntu) so hopefully can help!
Firstly, how did you install Jalview? There are a few ways to install jalview onto a linux machine (our own linux installer on https://www.jalview.org/download bundles its own Java runtime which should work fine, this is compiled with and bundles a Java 8 runtime. It installs into your user account in ~/opt/jalview).
Class file version 55 suggests you may have a Java 11 compiled jalview jar (Jalview is in a transition period from Java 8 to 11), perhaps installed using bioconda? This should absolutely run fine with openjdk-11, but perhaps you have a different java command on your PATH? What do you get if you run java -version on the command line? Ben
Hi Ben. Thanks very much for your reply.
YES. I installed Jalview through conda, and I'm using Ubuntu. java -version returns this:
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment Zulu10.3+5 (build 10.0.2+13)
OpenJDK 64-Bit Server VM Zulu10.3+5 (build 10.0.2+13, mixed mode)
I'm actually very new in bioinformatics and linux. I'm just following a tutorial on youtube. the tutor didn't have such issue because the video is for 9-10 month ago. I think I'm seeing that because I have downloaded a newer version of jalview.
Now, I'm confused! sudo apt-get install openjdk-11-jdk returns:
openjdk-11-jdk is already the newest version (11.0.10+9-0ubuntu1~20.04).
Can you try uninstalling other lower versions of openJDK from your system? Please make sure that no other tools depend on those previous versions before uninstalling. Since you are on ubuntu, you can use synaptic, graphical package manager.
initial 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)
any help is appreciated!
ADD REPLY
• link
updated 3.7 years ago by
Ram
44k
•
written 3.7 years ago by
mskr_
▴
20
1
Entering edit mode
That looks like there's no java installed in /usr/lib/jvm/java-11-openjdk-amd64 which suggests either you don't have openjdk-11 installed through the package manager, or you're not using ubuntu (or debian?). Do you know which flavour of linux you're using? If you're not sure you might get some answers with cat /etc/os-release.
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!
I am having the same problem as Hamid when using Conda & Linux system. When I have tried to specify the path using the 3 options and each time it says No such file or directory e.g. bash: /usr/bin/java: No such file or directory. Even the last one won't work. When I tried PATH=/usr/lib/jvm/default-java/bin:$PATH jalview, it again returns the message Error:LinkageError etc. I have tried all the steps Hamid has including the sudo apt-get install openjdk-11-jdk and your suggestions. The version of Jalview I have is openjdk version "10.0.2" 2018-07-17", the OpenJDK Runtime Environment Zulu10.3+5 (build 10.0.2+13) and the OpenJDK 64-Bit Server VM Zulu10.3+5(build 10.0.2+13, mixed mode), not the 11.0.8 version. Also I have the 18.04 version of Xbuntu. Have you any other suggestions? ben_s
to launch the graphical installer. This installation comes with its own bundled Java runtime (version 8) which will be used by default.
It installs into ~/opt/jalview and you can run it with
~/opt/jalview/jalview
and it might also appear in xubuntu's menus if they are freedesktop compatible (sorry I'm not 100% sure about xfce).
2) If you want to stick with the conda environment, you will really need an OpenJDK 11. You can download and install one of these (without needing root access) from https://adoptopenjdk.net/ but you'll then need to put that installation's .../bin in your PATH first with something like
export PATH=/home/username/openjdk-11/bin:$PATH
depending on where you install it.
I can't remember if conda makes jalview the command jalview.sh or just jalview but try both after installing the Java 11 and setting the PATH as above.
Probably you have openjdk-11-java version that supports class 44, not 45. I see that there is a request on web in 2018 to update it to 45 from 44. You can use openjdk ppas to update the jdk. But be careful before adding ppa. Look at this https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa and see adding it will update system openjdk-11-jdk and helps in launching the jalview. Or you can use an earlier version of Jalview (assuming that it would use <45class file). Please also post linux distribution you are using next time.
Hi h.gaikani, I'm a Jalview developer who develops on linux (kubuntu) so hopefully can help! Firstly, how did you install Jalview? There are a few ways to install jalview onto a linux machine (our own linux installer on https://www.jalview.org/download bundles its own Java runtime which should work fine, this is compiled with and bundles a Java 8 runtime. It installs into your user account in ~/opt/jalview). Class file version 55 suggests you may have a Java 11 compiled jalview jar (Jalview is in a transition period from Java 8 to 11), perhaps installed using bioconda? This should absolutely run fine with openjdk-11, but perhaps you have a different java command on your PATH? What do you get if you run
java -version
on the command line? BenHi Ben. Thanks very much for your reply. YES. I installed Jalview through conda, and I'm using Ubuntu.
java -version
returns this:openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment Zulu10.3+5 (build 10.0.2+13) OpenJDK 64-Bit Server VM Zulu10.3+5 (build 10.0.2+13, mixed mode)
I'm actually very new in bioinformatics and linux. I'm just following a tutorial on youtube. the tutor didn't have such issue because the video is for 9-10 month ago. I think I'm seeing that because I have downloaded a newer version of jalview.
Now, I'm confused!
sudo apt-get install openjdk-11-jdk
returns: openjdk-11-jdk is already the newest version (11.0.10+9-0ubuntu1~20.04).but java
-version says
something different.Can you try uninstalling other lower versions of openJDK from your system? Please make sure that no other tools depend on those previous versions before uninstalling. Since you are on ubuntu, you can use synaptic, graphical package manager.
coming from the same tutorial I have the same problem I run
but I got
command not found
error.results in
any help is appreciated!
That looks like there's no java installed in
/usr/lib/jvm/java-11-openjdk-amd64
which suggests either you don't have openjdk-11 installed through the package manager, or you're not using ubuntu (or debian?). Do you know which flavour of linux you're using? If you're not sure you might get some answers withcat /etc/os-release
.