Recently I bought a new desktop system and installed Windows 7 Ultimate 64-bit on it. Being a Java Developer, the first thing I did after regular setup is to download and install JDK. I was using Windows XP, Solaris or Mac OS for my development purpose till now and I was installing it for the first time on Windows 7 64-bit OS.
Here I am providing steps to download, install and configure Java in Windows 7 64-bit operating system.
1. Download JDK from Oracle website. Make sure to choose Platform as “Windows x64″ for 64-bit OS and “Windows” for 32-bit OS. If you are not sure whether you have 32-bit or 64-bit OS, you can check it in Control Panel > System > System type.
Currently the stable version available is JDK 6 Update 23 and the executable file is jdk-6u23-windows-x64.exe
2. Install the JDK from the downloaded executable file. It will also install JRE and some demo applications.
3. Now we need to setup environment variables so that we can execute java commands from command prompt. For this, go to Control Panel > System > Advanced system settings. In the “System Properties” pop up go to Advanced tab and click on “Environment Variables” button.
4. In the System Variables section, we need to set JAVA_HOME and edit Path variable. Variable name and values are;
Add “;%JAVA_HOME%\bin” to the Path variable now. Click on Ok button to save it.
5. Now we can run java commands from command prompt. You can check it by executing command “java -version” command.
- If you need only JRE, then you can use the operating system JRE that will be present in the program files. However you will have to add the System variable to use it.
- If you want to setup java only for the logged in user then you need to add Environment Variables in the User Variables section.