Java Bytecode Version: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
A valid class file starts with <code>0xcafebabe</code>, followed by the minor version as unsigned short, followed by the major version, as unsigned short. | A valid class file starts with <code>0xcafebabe</code>, followed by the minor version as unsigned short, followed by the major version, as unsigned short. | ||
{|wikitable | {|class="wikitable" style="text-align: left;" | ||
| a || | | a || | ||
|- | |- |
Revision as of 18:59, 12 June 2021
Internal
Overview
A valid class file starts with 0xcafebabe
, followed by the minor version as unsigned short, followed by the major version, as unsigned short.
a |
Playground
The following project produces a bytecode-version.jar that reads the bytecode version from a Java class: