The correct way to use GCJ:
#First install gcj and ecj
sudo apt-get install gcj-jdk
#example 1: compile a HelloWorld with a known main class
gcj -o hello HelloWorld.java --main=HelloWorld
#then run the binary
#example 2: compile a standalone Java .jar or .class with a known main class
gcj -o scimark2 scimark2lib.jar --main=jnt.scimark2.commandline
# complexity increases when you try to compile a .jar that in turn depend on other jars.
# i here use -findirect-dispatch to allow the compilation to continue in situations
# when the craftbukkit.jar contains references to classes in external jars, like ant and lucene,
# that can not be found at compiletime.
# If you have a lot of memory and then you should be able to compile the bukkit minecraft server
# by running the following:
gcj -findirect-dispatch craftbukkit.jar -o craftbukkit --main=org.bukkit.craftbukkit.Main
# unfortunately the raspberry pi do not have enough RAM to
# complete the static compilation of this large server application.
The complete manual to gcj is found here: