Showing posts with label gnu gcj. Show all posts
Showing posts with label gnu gcj. Show all posts

17 May 2007

Compile JAVA with gcj

to compile the common helloworld example

public class HelloWorld {

public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

with the gnu gcj compiler to JAVA bytecode
gcj -C HelloWorld.java

and interprete with the VM
gij HelloWorld

... or compile it to native code
gcj --main=HelloWorld -o HelloWorld HelloWorld.java
./HelloWorld


Guide to GNU gcj
yolinux.com - LinuxTutorialJava
Linux Journal - Developing Gnome Applications with JAVA