Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
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, 944🔥, 0💬
Popular Posts:
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
What Is js.jar in Rhino JavaScript 1.7R5? js.jar in Rhino JavaScript 1.7R5 is the JAR file for Rhino...
JDK 11 jdk.httpserver.jmod is the JMOD file for JDK 11 HTTP Server module. JDK 11 HTTP Server module...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...