Built a file Test.javaImport java.io. *; Public class test {public static void main (string args []) {system.out.println ("ok");}}
Enter Javac Test.java in the command line and then enter Java Test as follows: java.lang.unsupportedClassVersionerror: main (unsupported Major.minor Version 49.0)
This problem is mainly because the virtual machine version of the Java code is lower than the compilation. Because I installed JDK1.5 before, there is no problem, it can be compiled and run, but I installed oracle, Oracle, oracle, and Oracle.
Path changed, set it into the JDK, and put my original in my back, the system appeared in the order in order,
What is found first is Oracle's JRE, but its JRE is lower than me, it is 1.3, and this error will appear. Workaround: Set the first location of the PATH to the latest JDK.