JVM: Introduction
Contents
Let’s start small: start by reading the specification’s introduction
History of JVM
- initially built for programming network devices
- Web popularization led to an idea of Java code running insice a browser (HotJava browser)
- programs are host- and network-independent
- can be written once and run everywehere where virtual machine is installed
What is it?
- a component needed to achieve hardware and OS independence
- isolate programs from hardware details
- simplify migration across physical platforms
- can support dynamic downloading of software
- abstract computing machine
- has its own instrunction set
- manipulates memory at runtime
- some other languages are also implemented using virtual machine; historically, the earliest are:
- implementations
- prototype by Sun Microsystems in software running on PDA-like device
- currently, by Oracle: mobile, servers, desktops
- does not assume any particular hardware or OS
- interpreted or compiled to CPU instructions
- can also be implemented in CPU microcode or even directly on silicon
- can be used to implement other languages (see List of JVM languages (Wikipedia))
What does it know?
- knows nothing about Java language
- knows particular binary format (class format)
- class file contains JVM instructions (called bytecodes)
- …and symbol table, and other data
What does it do?
- checks constraints on class file (for security reasons)
- executes bytecode
- manages memory
- …
Other resources
Virtual Machines lecture slides
Ten wpis jest częścią serii jvm.
- 2022-14-02 - JVM: Loading, Linking, Initializing
- 2022-11-02 - JVM: Verification and Checks
- 2022-06-02 - JVM: Fields, Methods, Attributes
- 2022-02-02 - JVM: The Constant Pool
- 2022-26-01 - JVM: Names and Descriptors
- 2022-22-01 - JVM: Class File Format - Structure
- 2022-16-01 - JVM: Compiling for the JVM
- 2022-08-01 - JVM: Instruction Set Summary
- 2022-07-01 - JVM: Structure of the JVM
- 2022-04-01 - JVM: Introduction