Objectives
- Get a Java compiler installed and running
Follow the instructions at: https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
Type the following code in a text editor such as notepad. Save it as Hello.java (and remember where you saved it). Start a console window (Start | Run... | cmd). Change to the directory where you saved the file ('cd' command). Type the following to compile the program: javac Hello.java. If it compiles, then type the following to run it: java Hello.
public class Hello { public static void main(String[] args) { System.out.println("Hello, world!"); } }
If you have problems, you may need to check your PATH and CLASSPATH environment variable settings. Please try this soon so the instructor can help you get up and running as soon as possible.