Friday 1 March 2013

BASICS OF JAVA ENVIRONMENT


Phase 1: Java program is typed in a text editor (Notepad, Edit plus) and makes corrections if necessary.  The programmer specifies that the file in the editor should be save.  The program is stored on a second storage device such as a disk.  Java program files are stored with .java extension filenames.
            Save:   c:\jdk1.2.1\bin\filename.java

Phase 2: The programmer gives the command javac filename.java to compile the program.  At this stage, the Java compiler translates the Java program into byte code that is the language understood by the Java Interpreter.  If the program compiles correctly, a file called filename.class is produced.  This is the file containing byte codes that will interpret during the execution phase.

Phase 3: This phase is called loading.  The program must place in memory before it can be executed.  This is done by the class loader, which takes the .class file containing in byte code and translates it into the memory.  The .class file can be loaded from a disk on your system or over a network.

Phase 4: Byte code verifier confirms that all byte codes are valid and don’t valid Java Security Instructions.

Phase 5: Java Interpreter reads byte code and translates them into a language that the computer can understand and it executes the code.

No comments:

Post a Comment