CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-11-25
by Abhishek KM

Original Post

Original - Posted on 2012-07-11
by Juha Palomäki



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The version number shown describes the version of the JRE the class file is compatible with.
The reported major numbers are:
Java SE 13 = 57, Java SE 12 = 56, Java SE 11 = 55, Java SE 10 = 54, Java SE 9 = 53, Java SE 8 = 52, Java SE 7 = 51, Java SE 6.0 = 50, Java SE 5.0 = 49, JDK 1.4 = 48, JDK 1.3 = 47, JDK 1.2 = 46, JDK 1.1 = 45
Compile it in same version and run it on same version
The version number shown describes the version of the JRE the class file is compatible with.
The reported major numbers are:
<!-- language: none --> Java SE 13 = 57, Java SE 12 = 56, Java SE 11 = 55, Java SE 10 = 54, Java SE 9 = 53, Java SE 8 = 52, Java SE 7 = 51, Java SE 6.0 = 50, Java SE 5.0 = 49, JDK 1.4 = 48, JDK 1.3 = 47, JDK 1.2 = 46, JDK 1.1 = 45

(Source: [Wikipedia](https://en.wikipedia.org/wiki/Java_class_file#General_layout))
To fix the actual problem you should try to either run the Java code with a newer version of Java JRE or specify the target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions.
For example, in order to generate class files compatible with Java 1.4, use the following command line:
<!-- language: none -->
javac -target 1.4 HelloWorld.java
With newer versions of the Java compiler you are likely to get a warning about the bootstrap class path not being set. More information about this error is available in a blog post *[New javac warning for setting an older source without bootclasspath][1]*.
[1]: https://blogs.oracle.com/darcy/entry/bootclasspath_older_source

        
Present in both answers; Present only in the new answer; Present only in the old answer;