About Glass
Glass is a classical static compiler implemented as a .class (java bytecode) frontend of gcc. It generates the assembler source of individual cpu from the given class file of java.
Now Cygnus gcc team release more complete compiler for Java and Java bytecode - GCJ!
There are other (commercial or non-commercial) bytecode compilers:
and there are some bytecode-to-C translators:
This list may be very incompleted. Please let me know another bytecode compilers.
The other related works:
[compiler in OOPS]
[GC]
StoryGlass was written as a tool for the study of GC oriented to embedded applications. The current simple runtime library includes a prototype of paged concurrent GC.
Status
Now glass can compile all classes in classes.zip (jdk-1.1.6) and the fully compiled version of javac works with a simple runtime library.
Many important features of Java are missing in current version: Loading classes dynamically - No, Security - No, AWT - No and so on. Moreover one must write many native methods and runtime library for his system. Currently, only i386-linux version runtime library is written and updated. There is no Win* version.
Recent changes:
TODO
sources
INSTALL
We assume you have gcc-2.8.x source tree and want to compile glass in a separate directory.
(1) Extract glass-current.tar.gz in gcc-2.8.x/.
(2) If you have ever run configure in gcc-2.8.x directory, you must undo the configuration by running:
make distclean
(3) Go to the directory in which you want to build glass.
cd ..
mkdir i386-linux-glass
cd i386-linux-glass
(4) Specify where to find `configure' when you run it like:
../gcc-2.8.x/configure --srcdir=../gcc-2.8.x
(5) Build the compiler and other programs.
make LANGUAGES=glass
After installing compiler and other programs, you can build runtime libraries.
(6) Extract libclasses-current.tar.gz.
cd ..
tar xzvf libclasses-current.tar.gz
(7) Go to the directory in which you want to build libraries.
mkdir i386-libclasses
cd i386-libclasses
(8) Do configuration with specifying the sun's JDK directory.
../libclasses/configure --srcdir=../libclasses --with-sun-jdk=/usr/local/jdk1.1.5
(9) Build libraries.
make