Install Java JDK7 on Mac OSX Snow Leopard 10.6.8

1. Download the latest JDK 7 from the Oracle web site.  jdk-7u21-macosx-x64.dmg

2. I ran and mounted the JDK 7 dmg file.  A volume appeared on my desktop called JDK 7 Update 21.

3. I extracted the contents of the installer using a program called Pacifist which I downloaded from to a folder I created on the desktop.  You have to first click on Open Package within Pacifist and then load the JDK 7 Update 21 / JDK 7 Update 21.pkg package.  Once you load the package, select all the contents and drag it into a folder on the desktop.

4. At this point, you'll want to navigate to the JavaVirtualMachines directory located at [hd] / System / Lbrary / Java / JavaVirtualMachines.  You'll probably see 1.6.0.jdk package already listed.  Copy this file to the desktop and rename it to 1.7.0.jdk.  Now delete the contents within the 1.7.0.jdk package.  

5. Open  the directory where you extracted the installer contents to on the desktop.  You'll see 2 folders: JDK 7 Update 21 Folder and JDK 7 Update 21 Folder-1.  

6. Navigate to JDK 7 Update 21 Folder / Contents Directory.  There is a file called Info.plist and 2 folders called Home and MacOS.  Drag these into the 1.7.0.jdk package.

7.  Now open the JDK 7 Update 21 Folder-1 / Contents directory and drag everything into the package as well.  You do not need to replace any files or folders that already exist.

8.  Now drag the modified 1.7.0.jdk package into System / Library / Java / JavaVirtualMachines directory and double click to open it.  You should see the java preferences dialog at this point which should now list Java SE 7 as an option.  Drag it to the top and close.

If you are using NetBeans and started a project in 1.6 and continuing it in 1.7, you may need to change the Source/Binary Format located under Sources in the Project Properties.  You should see a drop down that lists JDK 6.  You need to change this to JDK 7.

When you open a Netbeans project or create a new one, you should notice the 1.7 library already loaded.  I ran the following to make sure it worked correctly:
public static void main(String[] args) {
and the following displayed in the console: