I have a problem with my compiled Java application on Ubuntu. It throws UnsupportedClassVersionError
.
I am compiling with a higher JDK version than the one that is
You will also need to do:
sudo update-alternatives --config javac
Select the desired java compiler from the list provided. For example on Centos 5
There are 2 programs which provide 'javac'.
Selection Command
-----------------------------------------------
1 /usr/lib/jvm/java-1.6.0-openjdk/bin/javac
*+ 2 /usr/lib/jvm/java-1.7.0-openjdk/bin/javac