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:
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, ∼1365🔥, 0💬
Popular Posts:
Where to get the Java source code for Connector/J 8.0 User Impl module? Java source code files for C...
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...