Contents

JVM: Introduction

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.

Wszystkie wpisy w tej serii: