Login/Register

How to: Install the Java JDK on Windows 7 and fix Path Variables

created by BasicSysAdmin

Tags: Windows, Windows 7, Java

Jun 04, 2016

Introduction

In this tutorial, I will be showing you how you can install the Java JDK and how to fix the 'javac' is not recognized as an internal or external command, operable program or batch file. problem.
Prerequisites


In order to follow this tutorial, you will need the following

  • Windows 7


  • Download the JDK

    To install the Java JDK on Windows, you will need to open up an internet browser and navigate over to here. When you get there, you will need to accept the licence agreements and then click the download button next to where it says your version of windows.

    Installing

    Once you have downloaded the JDK, you can run the installer. The installer is like all others, just keep spamming next untill its installed! :P

    Checking Installation has run correctly

    Now that it has installed, you will need to go to the start menu and open CMD. You can see this been done with the images below.


    When you have CMD open, you should type in javac (as shown in the image above). If this errors, like above then you will need to progress on to the next step. If not, your done!
    Fixing Path Variables

    You will now need to find the installation directory for where java is installed. It would have asked you for this during the install. My install directory is
    C:\Program Files\Java\jdk1.8.0_20\bin

    Once you have this, copy the address.

    You will now need to right click on the My Computer link in the Windows Explorer (on the right) and click properties. This should open a new window. In the new window, on the right, click the Advanced System Settings. Again, this should open up a new window. Now click the Environment Variables to open up our next window.




    Finally, in the System Variables section, find where it says path and then click the edit button. In this final window, you will need to go right to the begining of the text and paste your path copied earlier followed by a semi-colon;

    Now you have done this, click ok to save the settings and then reboot your machine. You can then open up CMD again and type in javac. It should look something like this now. If you have any issues, watch the video and then comment below if you are still stuck.