The version number shown describes the version of the JRE the class file is compatible with.
(显示的版本号描述了与类文件兼容的JRE的版本。)
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
(Source: Wikipedia )
((来源: 维基百科 ))
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.
(要解决实际问题,您应该尝试使用Java JRE的较新版本运行Java代码,或为Java编译器指定目标参数,以指示编译器创建与Java早期版本兼容的代码。)
For example, in order to generate class files compatible with Java 1.4, use the following command line:
(例如,为了生成与Java 1.4兼容的类文件,请使用以下命令行:)
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.
(使用较新版本的Java编译器,您可能会收到有关未设置引导程序类路径的警告。)
More information about this error is available in a blog post New javac warning for setting an older source without bootclasspath . (有关此错误的更多信息,请参见博客文章New javac warning有关设置没有bootclasspath的较旧源的警告 。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…