Problems with Java when installing Minecraft

The following should work for windows:

  1. Go to Start>Run>cmd.

  2. Type java -version and press return.

  3. You should see something like this:

    java version "1.7.0_05"
    Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
    
  4. Make a note of the second number on the second line (eg: java version "1.7.x_xx" --> 7.

  5. 64 bit only: Check whether you're using a 64 or 32 bit version of java by looking in C:\Program Files\ and C:\Program Files (x86)\ for a folder called Java. Inside this folder there should be another which corresponds to your version number above. This should be jre? where the ? is 7 in this case. If you cannot find a jre? folder in the Program Files directory, then you do not have the 64 bit version of java installed. Go here and grab the Windows 64 bit version, then install it.

  6. Windows XP: Right click on My Computer, select Properties, then select the Advanced tab.

    Windows Vista or 7: Right click on Computer, select Properties, then click on Advanced system settings.

  7. Click Environment Variables.

  8. Under System variables click on New.

  9. Enter JAVA_HOME as the Variable name and C:\Program Files\Java\jre? as the Variable value, where ? is the version number from earlier (7 in this case).

  10. Click OK to close all the windows, then try running Minecraft again.