On a new Debian system I installed JRE using
sudo apt-get install default-jre
Then I downloaded a jar-file and tried running it:
java -jar server.jar
The file threw an exception:
java.lang.unsupportedclassversionerror unsupported major.minor version 52.0
So I started looking for a solution and followed a user's instruction:
sudo rm /usr/bin/java
sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin
Afterwards I realized that I don't even have a directory /Library
and therefore this link isn't pointing anywhere.
Now I can't even run java anymore:
java -jar server.jar
-bash: /usr/bin/java: No such file or directory
I already tried uninstalling JRE und reinstalling it:
apt-get remove default-jre
apt-get update
apt-get install default-jre
Which didn't change anything though.
Java seems to be installed:
find /usr -name java
/usr/share/bash-completion/completions/java
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-7-openjdk-amd64/bin/java
/usr/bin/java
is a symbolic link that is broken, according to the question. Installing some 32-bit libraries will not make the link into the non-existing directory/Library
work. – Kusalananda Nov 25 '19 at 10:34