Monday 23 January 2012

Lesson 1 - Getting / Installing Java

1. Download and Install the Java JDK6 Update with Netbeans bundle here or click this direct download for windows.

Click here to view full size




2) Run the installer that you just downloaded. (Just keep clicking next, install etc the defaults are fine).

Click here to view full size



3) Start Netbeans:
Click here to view full size



4) It should load with the screen below:
Click here to view full size




5) Click File-> New Project and you should get a pop up like so:




6) Make sure java application is selected and click next.
Click here to view full size




7) Change the project name to 'HelloWorld' (one word) like below before clicking finish.
Click here to view full size




8) Your screen should now look like this:
Click here to view full size



9) Remove the words 'package helloworld;' for now as well as all the greyed out text (comments). We will explain this later.




10) Move the file out of the package on the left pane into its own space and delete the package it was within after doing this. Now your screen should look like below:
Click here to view full size



11) Explanation of classes and main method.



12) Type System.out.println("Hello World"); within the main block.
Click here to view full size



13) Explanation of what this does.



14) Click the big green Play button to run the project.

15) You should see the words 'Hello World' in the output window of the IDE.

16) Congratulations, you just built and ran your own java application!