Just Another Way To Run Java Programs

Gianni Banfi

Diploma Thesis Winter 1996
Supervisor: P. Reali
Institute for Computer Systems, ETH Zürich


Objectives

Java is a programming language and environment developed by Sun Microsystems. To obtain a platform independence, programs written in Java are not compiled to a specific executable code. Instead an assembler- like intermediate representation is used, the byte-code, which has then to be decoded in order to be able to run Java programs. The goal of this work was to implement a virtual machine capable to decode the byte-code and to run Java programs under the Active Oberon System . To achieve optimal performance the byte code is not interpreted. On the contrary a compiler has been implemented such that the byte-code is in a first step transformed in native code and then executed. In this way we can take advantage of the portability deriving from the intermediate representation, without slowing down the execution of the programs.

Results

After four months of work, we have a first implemenetation of the Java virtual machine which is able to run simple Java programs under Active Oberon. There are still several limitation: interfaces, exceptions, native methods and threads are not yet supported. The standard Java libraries can also not be used. Performance are quite good for a first implementation. We achive in fact a sped-up of 7.65 in respect to the interpreted virtual machine developed by Sun.


[ Department | Institute | Student Projects ]
ETH Zürich: Institut für Computer Systeme, ETH Zentrum, CH-8092 Zürich
Comments to Patrik Reali <reali@inf.ethz.ch>
April 4, 1997