A Java Virtual Machine (JVM) is an interpreter for Java programs. The idea behind a virtual machine, or virtual processor, is that it executes Java "bytecode" in the same way that a real processor executes native or "machine code". The virtual machine is a program compiled into native code, and runs in the computer's real
processor. Java code then runs in the virtual processor. A problem that programmers generally face when trying to migrate applications to a different architecture, central processor, or operating system is that configuring the code to work with the new setup is something that has to be done again with each application.
The idea behind the virtual machine is that these configurations issues are restricted to implementing the virtual machine correctly on the chosen platform. This then provides in principle the same virtual environment for compiled Java applications as a virtual machine on any other platform.
However, not all virtual machines are equal. In certain respects, the Java specification does place a burden on the developer to understand how the underlying operating system works in order ensure that
the code runs as expected. For example, Java programs that utilize concurrency, or multi-threading features, may not execute the same on two different operating systems because, for reasons of efficiency and robustness, the virtual machines adopt the different threading models of the respective operating
systems. The Java specification encourages developers to understand the code they are writing, and to take into account these issues.
Oracle has implemented a JVM to run alongside the Oracle 8i database. The Oracle JVM is the engine driving the Oracle 8i Java platform (previously known collectively as JServer). The platform consists of the following main structures:
❑ Java Stored Procedures
❑ Java Database Connectiviy (JDBC) interface for mediating database connections from both
remote and local Java processes
❑ SQLJ translator for compiling SQLJ source files, and SQLJ Runtime classes for SQLJ
❑ Enterprise JavaBeans (EJB) container and an Inprise Visibroker ORB to manage access from
and to deployed EJB and CORBA objects
❑ The JDK libraries, which are the standard compiled Java classes available for client
stored procedures
❑ The Oracle Java Virtual Machine
❑ Oracle RDBMS libraries to interact with databases
❑ Operating system