Skip to content
Search

Java class file

lastmod 2023-04-04created 2023-04-041 edits

A Java class file is a file (with the .class filename extension) containing Java bytecode that can be executed on the JVM (Java Virtual Machine). A Java class file is usually produced by a Java compiler from Java programming language source files (.java files) containing Java classes (alternatively, other JVM languages can also be used to create class files). If a source file has more than one class, each class is compiled into a separate class file.

JVMs are available for many platforms, and a class file compiled on one platform will execute on a JVM of another platform. This makes Java applications platform-independent.

General layout

Major version numbers

major version number of the class file format being used.

  • Java SE 21 = 65 (0x41 hex),
  • Java SE 20 = 64 (0x40 hex),
  • Java SE 19 = 63 (0x3F hex),
  • Java SE 18 = 62 (0x3E hex),
  • Java SE 17 = 61 (0x3D hex),
  • Java SE 16 = 60 (0x3C hex),
  • Java SE 15 = 59 (0x3B hex),
  • Java SE 14 = 58 (0x3A hex),
  • Java SE 13 = 57 (0x39 hex),
  • Java SE 12 = 56 (0x38 hex),
  • Java SE 11 = 55 (0x37 hex),
  • Java SE 10 = 54 (0x36 hex),[4]
  • Java SE 9 = 53 (0x35 hex),[5]
  • Java SE 8 = 52 (0x34 hex),
  • Java SE 7 = 51 (0x33 hex),
  • Java SE 6.0 = 50 (0x32 hex),
  • Java SE 5.0 = 49 (0x31 hex),
  • JDK 1.4 = 48 (0x30 hex),
  • JDK 1.3 = 47 (0x2F hex),
  • JDK 1.2 = 46 (0x2E hex),
  • JDK 1.1 = 45 (0x2D hex).

For details of earlier version numbers see footnote 1 at The JavaTM Virtual Machine Specification 2nd edition

See also

Favorite site

author Zer0 sitemap