In this example, there are four different Java versions that are installed: OpenJDK JRE 1.6, Oracle Java JRE 1.6, OpenJDK JRE 1.7 and Oracle Java JRE 1.7. To solve this problem, you need to change the default Java version you are using to Java JRE 1.7 or higher (assuming that such JRE is already installed).įirst, check available Java versions on your Linux system by using update-alternatives command: $ sudo update-alternatives -display java Exception in thread "main" : com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0įor example, in this case the program is compiled for Java JRE 1.7 but the system only has Java JRE 1.6. If you run the Java program on a Linux system which does not meet the lowest JRE version requirement, you will encounter the following error while starting the program. When a Java program is compiled, the build environment sets a target which is the oldest JRE version the program can support. How can I switch the default Java version on Linux?Įxception in thread "main" : com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 Looks like the Java program is compiled for a different Java version than the default Java program installed on my Linux. Question: When I am trying to run a Java program on Linux, I am getting the following error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |