Installing Java on Windows (32-Bit or 64 Bit)
For those in a hurry go to the quick start summary at the end of the article.
Java is used to write and run computer programs and applications (apps). Java is free. To run Java programs on Windows you need to install the Java Runtime Environment (JRE). To write Java programs on Windows you need to install the Java Development Kit (JDK). The JDK includes the JRE. The JDK is required for Java Integrated Development Environments (IDEs). IDEs make writing, testing and debugging software easier. Links to some IDEs are given later. For more information about Java see the What is Java? page at www.java.com.
- The free Java Runtime Environment (JRE) is for running Java software and Java based apps.
- The free Java Development Kit (JDK) is used for compiling and developing Java software and apps, usually in an IDE.
- The JDK comes with JRE.
Need to work on your software project work remotely? Get an easy access to your online private workspace with programming and testing tools to catch up with your coding work on your high-performance virtual PCs from www.CloudDesktopOnline.com. Now you can access complete MS office suite on the same PC by visiting O365CloudExperts.com with top-notch tech-support from Apps4Rent.com.
Download and Installation of Oracle's Free Java Environment
Start installing Java on Windows by going to the Java Standard Edition (SE) Downloads page. At the Java downloads page select the Java Platform (JDK) download button which looks like this:
The current release of the Java JDK platform will be show below the button in the format XuYY, for example 8u99 (for release 8 update 99). A list of supported platforms will be shown.
Before selecting a download file click the Accept License Agreement option.
From the list of download files select the appropriate Windows option, either:
To install Java on Windows 32-bit (Windows x86) select jdk-XuYY-windows-i586.exe (where XuYY is the current JDK version, e.g. jdk-8u99-windows-i586.exe).
To install Java on Windows 64-bit select jdk-XuYY-windows-x64.exe (e.g. jdk-8u99-windows-x64.exe).
How to Check if 32 or 64 Bit Windows
If unsure whether you are running 32-bit or 64-bit Windows use the System option in Windows to find the System type:
- Windows 10 - Select Settings then System. Select About and read the System type line.
- Windows 8.1 - System type can be accessed via PC info from the settings icon on the charm bar.
- Other versions of Windows - Via System and Security from Control Panel, under Basic Information.
Run the Java Installer
Run (Open) the selected EXE file to install the JDK. (Alternatively save the file for running offline, for example to be taken and installed on another Windows machine.) Please only run executable code from trusted sources. Only download the Java installer from oracle.com.
When the Java installation program runs Windows will display the User Account Control (UAC) dialog. At the UAC dialog select Yes.
The Java set up screens will be shown. You will need to select the Next button to get through the screens. (You shouldn't need to change any options presented. Older Java installers sometimes came bundled with a third party browser tool bar. We recommend you deselect that option if it appears). If you want to install the JDK and JRE to a different directory other than C:\Program Files\Java then select the Change button on the appropriate set up screens to enter or select a different location.
The progress bar is displayed as the JDK and then the JRE is installed.
Once installed click the Close button. (The Next Steps button opens the browser). Java is now installed and ready to run Java programs. Java source code can be compiled into programs.
Optionally Set the JAVA_HOME Environment Variable
Setting the JAVA_HOME environment variable may be required because on some Windows installations IDEs, such as Android Studio and the Android SDK tools, may have trouble accessing the Java JDK. To set the JAVA_HOME environment variable
- Either select System under System and Security from Control Panel. Click on Advanced system settings (under Control Panel Home on the left). On the System Properties window the Advanced tab should be set, click the Environment Variables button.
- Or to quickly access the Environment Variables in Windows go to the Start screen (press the Windows key) and type env then select Edit environment variables for your account.
Note: You may require administrator rights to add the new environment variable setting.
Under System variables (or User variables) click the New button. Enter JAVA_HOME in Variable name then enter the path to the Java JDK in Variable value (e.g. C:\Program Files\Java\jdk1.8.0_99, or the actual install location if it was changed). Enter the value for your system. Click OK to close the dialogs.
Checking that Java is Installed on Windows
If you need to check that Java has installed use the command line shell (Command Prompt aka DOS Prompt). Open a Command Prompt box:
- Windows 10 and 8.1 - At the Windows Start Screen type com to find the Command Prompt.
- Other Windows versions - In the Accessories folder select Command Prompt.
- Alternative ways to start the Command Prompt - Start cmd.exe in the Windows/System32 directory. Or press the Windows key and R and type cmd then Enter in the Run box.
At the prompt type java -version and press enter. If installed correctly Java will display the current version number. It is shown in the form 1.X.0_YY (where X is the release version and YY is the update number).
Type exit then press Enter (Return) to close the command prompt.
Writing Java Programs
To produce Java software you need to write Java code. Use a text editor such as Windows Notepad, or even better Notepad++. Alternatively jEdit is an editor written in Java. For more productivity use an IDE. IDEs such as Eclipse, NetBeans or IntelliJ IDEA are designed to help with writing, testing and debugging programs. Programming environments BlueJ and Greenfoot are useful for beginners. All of these are free to download and use.
Hopefully installing Java on Windows has been easy. You are now ready to run and write Java Powered programs.
Quick Start Summary on Installing Java on Windows
- Go to the Java SE Downloads Page.
- Click the Java Download button.
- Click the radio button to accept the licence.
- Select the correct 32-bit (Windows x86) or 64-bit (Windows x64) EXE download file for your computer.
- Run the EXE.
- Accept the UAC dialog.
- Accept the Java installer prompts.
- Press Close to exit the installer once complete.
- Optionally set the JAVA_HOME Environment Variable.
Author:Daniel S. Fowler Published: Updated: