Java Notes - See Files at http://teach.kralsite.com 
Getting Started
Get this code 
HelloWorldApp.java
public class HelloWorld {
  public static void main(String [] args) {
      System.out.println(“Hello World”);
  }
}	
Windows
Edit the PATH variable by adding the file location that points to the location of your java installation. Point to the /bin directory (folder).

Example for Windows 7.   
Variable		Value
Path			 [a bunch of stuff separated by semicolons];C:\Program Files (x86)\Java\jdk1.7.0_01\bin

Setting Path on Windows
Windows 7
	1.	Select Computer from the Start menu
	2.	Choose System Properties from the context menu
	3.	Click Advanced system settings > Advanced tab
	4.	Click on Environment Variables, under System Variables, find PATH, and click on it.
	5.	In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
	6.	Reopen Command prompt window, and run your java code.

http://java.com/en/download/help/path.xml

Compile and Run

Open Command Prompt
> java -version
java version "1.6.0_27"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 1.6.0_27-b13, mixed mode, sharing)
> dir
> cd My Documents
> cd (wherever you put your code)
> dir
HelloWorldApp.java
> javac HelloWorldApp.java
> dir
HelloWorldApp.class
HelloWorldApp.java
> java HelloWorldApp
Hello World!
> 

http://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html 

Where does Java live?

Windows 7

Java 7 (64 bit)
C Program Files Java

Java 6 (32 bit)
C Program Files (x86) Java