How to Change a Class File
The Java programming was developed and released by Sun Microsystems in 1995. Java programs are written as text files and then compiled into byte code by the Java compiler. The compiled Java files are referred to as "class" files and can be run via the Java Runtime Environment installed on major computer operating systems. In order to change a Java class file, you have to recompile the original Java source code with the Java Development Kit (JDK).
Instructions
-
-
1
Download and install the latest JDK from the Sun Microsystems uniform resource locator listed in the Resources section of this article.
-
2
Open the Java source file for the class file you desire to change in your computer's text editor. Make the desired changes to the file, save and exit the text editor.
-
-
3
Open the MS DOS prompt by selecting the "Start" menu and typing "command" in the search text field. Then change to the directory that the Java source file is saved on your computer. For example, if your java source file was saved in "c:\myJavaFiles" the command to enter at the DOS prompt would be "cd c:\myJavaFiles" followed by pressing the "enter" key.
-
4
Type the following command at the DOS prompt: "javac myJavaFile.java" and the class file will be changed.
-
1