- Code: Java programmers write source code in text files (perhaps using an IDE
), then saved with a file suffix of .java.
Java considers all files residing together in a specific project directory/folder part of a custom package of files containing localized resource messages, images, sounds, GUI forms, HTML code, query definitions, parameters (data paths to resources), and third-party library classes
.
Each source file must contain an import command to specify each external package
it references, except for the java.lang library automatically included by the compiler.
- Compile: Class files are built from source files by a Java compiler provided with the JDK or with an IDE. Byte-code is called neutral intermediate code because its syntax is conceptually between human(nerd)-readable source and low-level machine code. Discussions about a Java "class" refer collectively to the byte-code and the source code from which it is derived.
- Correct Syntax Errors: The compiler issues messages to the programmer if the source code does not meet Sun's Java Language Specifications 2nd Edition. Many programmers apply additional tools to source code.
If the compiler strictly follows Sun's Java Virtual Machine Specification, it should create byptecode that is usable by a Class Loader within any Java Virtual Machine (JVM) running on a target client's machine with a variety of operating systems (Windows, UNIX, Linux, etc.).
- Invoke: Running in a “soft” universal abstraction layer, the JVM dynamically (as needed) loads Java Core APIs and custom application classes. This is called just-in-time compilation.
Before Java applets can be linked from an Internet browser or Java applications invoked from the client machine's file system, the JVM must be installed on the client machine.
The JVM uses port 5901.
- Behind the scenes, A Bytecode Verifier detects whether the bytecode violates Java security restrictions and other run-time checks.
- Execute: At run-time, the Interpreter translates bytecode into low-level machine language instructions optimized to the specific capabilities of the client machine (multiple processors, etc.). The intrepreter also frees memory automatically by performing garbage collection
.
- Unit Test, debug logic errors, and Tune performance using profilers other utilities.
Monday, June 05, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment