Knowledge Base

File extension description in German
File extension description in French

File Extension CLASS

Files that contain the CLASS file extension are associated with the Java programming language. CLASS stands for binary files created when Java files are created. They are compiled into a virtual machine-readable file that is read by the Java interpreter to allow your operating system to run the functions which are coded in the file.

Java creates CLASS files automatically when it compiles a java file. Files with the JAVA extension are the source file for any Java application and the CLASS file extension is the byte code which is independent of any platform. In order to run CLASS files, you should have Java Virtual Machine (JVM) installed. It interprets the byte code for your PC’s processor, so it can deliver instructions for the Java application. If the source file has more than one class, then each class is assigned its own CLASS file, which is then loaded into Java Virtual Machine.

Java was created to allow applications to run on any type of platform without having to be reprogrammed to accommodate separate platforms. The Java Virtual Machine makes this possible by being able to interpret platform instructions and other specific related to the platform.

How to Open CLASS Files

If you do not have Java installed on your computer, you can download a free version from its website. Also, since there is more than one version of the Java Virtual Machine, you may not be able to open CLASS files using JVM. In this case the Java Runtime Environment will open and execute CLASS files. You can obtain a free download of JRE from Oracle or CNET website. JRE provides the necessary libraries, JVM, and other components to run programs written with Java programming Language.

If you run Windows, Linux, or Mac OS X, you can also open CLASS files using dirtyJOE, which is a program that allows you to view CLASS file binaries or JD-GUI which is a standalone decompiler program that allows you to open and review source codes for CLASS files. JD-GUI is delivered in ZIP format for Windows, TAR.GZ for Linux, and .DMG for Mac OS X.

If you want to edit CLASS files, you can use Java Class File Editor. It is available as a free download from the SourceForge website. This program opens Java CLASS file binaries, so you can view the internal structure and modify portions of the file even when the source code is unavailable. Then you save the file back in its usual file extension CLASS. The program also generates reports with the information on the binaries similar to the javap utility.