2015-09-11 HW02

posted Sep 11, 2015, 11:13 AM by Samuel Konstantinovich   [ updated Sep 11, 2015, 11:14 AM ]
1. Install JDK 7 (link on main course page)

2. (windows only)
I needed to add this to my path but your location may be slightly different:
  C:\Program Files\Java\jdk1.7.0_79\bin\

3. Test the JDK by running this on a terminal:  
javac -version

4. Paste the following into HelloWorld.java :

public class HelloWorld{
    public static void main(String[]args){
        System.out.println("Hello, my name is Inigo Montoya, You killed my");
        System.out.println("father, prepare to die!");

5. Open a terminal and cd into the same directory as your file, then run the commands:
javac HelloWorld.java
java HelloWorld