j-- is a compiler for a language (also called j--) that is a non-trivial subset of the Java programming language. Refer to The j-- Language Specification for the formal details about the j-- language.The compiler. The j-- compiler generates code for the Java Virtual Machine (JVM).
The following command compiles the compiler:
$ ant
The following command runs the compiler and prints the usage string:
$ ./bin/j--
The following command compiles a test j-- program HelloWorld.java
using the j-- compiler, which translates the program into a JVM
bytecode program HelloWorld.class
:
$ ./bin/j-- tests/HelloWorld.java
The following command runs the HelloWorld.class
program using the
JVM:
$ java HelloWorld