Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
"javap -v" - Major Version Code
How to use the major version code in the "javap" output to determine the Java version of a Java class bytecode.
✍: FYIcenter
The bytecode of each Java class has a format version code called "major version"
of 2 byres at byte offset 7.
You can convert bytecode "major version" to the version of
the Java environment where the bytecode is expected to run
using the following conversion table:
... Java 1.2 uses major version 46 Java 1.3 uses major version 47 Java 1.4 uses major version 48 Java 5 uses major version 49 Java 6 uses major version 50 Java 7 uses major version 51 Java 8 uses major version 52 Java 9 uses major version 53 Java 10 uses major version 54 Java 11 uses major version 55 Java 12 uses major version 56 Java 13 uses major version 57 Java 14 uses major version 58 Java 15 uses major version 59 Java 16 uses major version 60
If you use the verbose option "-v" or "-verbose" option of the "javap" command, this bytecode format version code will be printed output as "major version".
1. Compile HelloWorldFrame.java used in the last tutorial into a bytecode file, HelloWorldFrame.class:
> javac HelloWorldFrame.java
2. Print out its "major version" as the bytecode format version using "javap" command with the "-v" option.
> javap -v HelloWorldFrame.class | grep "major version" major version: 59
According to the conversion table, HelloWorldFrame.class bytecode is expected to run in Java 15 environment.
2021-09-09, ∼1346🔥, 0💬
Popular Posts:
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
How to download and install Apache ZooKeeper Source Package? Apache ZooKeeper is an open-source serv...
What Is HttpComponents commons-httpclient-3.1.j ar?HttpComponents commons-httpclient-3.1.j aris the ...
MXP1 is a stable XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but c...