Java Goals
Java General Goals
- A comprehensive programming language.
- Platform independent.
- For both online (applets) and offline applications.
- Object-oriented.
- Easy to learn and use.
- Less pitfalls of other languages.
- Code portability.
- Auto Garbage Collection.
- Multi-threading.
- Better code security.
- JVM for both software and hardware.
Java Virtual Machine
- An application.
- Define instruction set(CPU).
- Define register set.
- Define class file format.
- Define stack.
- Define Garbage collected heap.
- Define memory area.
- Maintain proper type discipline from bytecodes.
- Check majority of type checking.
- Wider compliance for other JVM if approved by Sun.
Garbage Collection
- Deallocate memory that is no longer needed automatically.
- Provide a system-level thread to track memory allocation.
- Different JVM has different Garbage Collection algorithm.
Java Runtime Environment
- Load code.
- Verify code.
- Execute code.
- Installed in client machine for running Java applications.