Java Bytecode Version: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:
=Playground=
=Playground=
The following project produces a bytecode-version.jar that reads the bytecode version from a Java class:
The following project produces a bytecode-version.jar that reads the bytecode version from a Java class:
{{External|https://github.com/ovidiuf/playground/tree/master/java/bytecode/bytecode-version}}
{{External|https://github.com/ovidiuf/playground/tree/master/java/bytecode/bytecode-version/README.md}}

Revision as of 18:55, 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.

Playground

The following project produces a bytecode-version.jar that reads the bytecode version from a Java class:

https://github.com/ovidiuf/playground/tree/master/java/bytecode/bytecode-version/README.md