Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
Java Programming

Running programs

 

0) Hello World

Running programs
There are typically two stages to running a program. First we compile, then we execute.

1. [ Java ] Compile


Big

The java compiler is javac, it takes a .java file and creates a .class file. The .class file is executed by the java command.

[andrew@sqlzoo2 andrew]$ /opt/jdk1.5.0_03/bin/javac Hello.java
[andrew@sqlzoo2 andrew]$ /opt/jdk1.5.0_03/bin/java Hello
Hello world