bock1
Bootstrap-only compiler for a subset of java(tm)
Usage
bock [-s
start-class]
[-o
output-file]
java-file ...
Overview
BOCK reads all the java-files specified on its command line, parses them as source code in a language which is a subset of the Java(tm) language, and writes an equivalent C program as output.
Please note that BOCK is not meant as a production compiler. It is a throw-away first-attempt compiler. The second attempt, Jackal, will be written after BOCK is capable of compiling a reasonable subset of Java(tm) programs. Jackal will be written in the Java(tm) subset which BOCK can compile, resulting in a Java(tm) system which can be bootstrapped entirely from a C-only environment.
BOCK is a somewhat user-unfriendly command; it does not include the standard library automatically, and it does not compile its C output into native code automatically. For a command which does these things, see jcomp(1).
Options
-
-s -
Specifies the name of the class whose
main()function should be called when the program is run. If not specified, Test is used.
-
-o -
Specifies which file to write generated C to. If not specified, BOCK writes compiled code to its standard output.
Files
BOCK does not use any external files other than those specified on its command line.
There is a subset of the Java standard library in /usr/share/bock/lib/*. No extra files are needed to implement the library's native methods.
Diagnostics
If BOCK detects an error or a construct it cannot compile, it writes a message to its standard error output and terminates with a non-zero exit code. There are many errors which BOCK does not detect.
Releases
Unchanged in 4 releases since Debian 2.1 (Slink).