J2SE Development Kit 5.0 (JDK 5.0) is supported on Microsoft Windows running Intel IA32, 100% compatible processors, and AMD Opteron 32. For supported versions of Windows, along with disk and RAM requirements, see System Configurations.
The minimum physical RAM is required to run graphically based applications. More RAM is recommended for applets running within a browser using the Java Plug-in. Running with less memory may cause disk swapping which has a severe effect on performance. Very large programs may require more RAM for adequate performance.
For the amount of disk space required, see Windows Disk Space Requirements.
Note - The JDK has two version numbers -- external version number 5.0 and internal version number 1.5.0.
Note - Trying to install the JDK on a non-supported version of Microsoft Windows or on a machine that doesn't have a sufficiently up-to-date Service Pack will cause the installer to generate this warning: "We recommend that you do not install this Java platform for the following reasons: This Java platform does not support the operating system or operating-system service pack on this machine."
In this procedure, you will run the self-installing executable to unpack and install the JDK software bundle. As part of the JDK, this installation includes the Java Plug-in and Java Web Start, as well as an option to include the public Java 2 Runtime Environment. (The JDK also contains a private JRE for use only by its tools.)
For issues related to Windows Online Installation (IFTW) and Java Update, see the Windows Installation (IFTW) and Java Update FAQ.
Java Update - Installing the public JRE automatically installs the Java Update feature. The purpose of Java Update is to provide the latest update of Java to your computer in a flexible manner via options that you select. Java Update runs a scheduler ( jusched.exe
) as a background process. After rebooting your computer, as described below, you will see it running in the Processes tab of the Windows Task Manager. Update options may be set via the Java Plug-in Control Panel Update tab, including turning off the auto-update feature. If for some reason you do not want the scheduler running at all, you can kill it by doing an End Task in the Windows Task Manager.. For complete information on setting Java Update options, see the Java Plug-in Control Panel Update tab.
Print or bookmark these instructions - After the JDK software has been installed, you may be asked to reboot your system. To continue using these instructions after rebooting, either print this page now, bookmark it now, or use your Web browser's history function to get back to this page.
Troubleshooting - If you have any difficulties, see the Troubleshooting section at the end of this document.
Note: For any text on this page containing the following notation, you must substitute the appropriate update version number for the notation.
<version>
For example, if you are downloading the installer for update 1.5.0_01, the following file name:
jdk-1_5_0_<version>-windows-i586.exe
would become:
jdk-1_5_0_01-windows-i586.exe
1. Check the download file size (Optional)
If you save the self-installing executable to disk without running it from the download page at the web site, notice that its byte size is provided on the download page. Once the download has completed, check that you have downloaded the full, uncorrupted software file.
2. If 5.0 Beta 1, Beta 2 or RC is installed, uninstall it.
Use the Microsoft Windows Add/Remove Programs utility, accessible from the Control Panel (Start -> Settings -> Control Panel).
3. Run the JDK installer
Note - (1) You must have administrative permissions in order to install the JDK on Microsoft Windows 2000 and XP. (2) For users doing this installation on non-Western 32-bit machines, select "Custom" for Setup Type. Then, in Custom Setup under feature 2 ("Support for Additional Languages"), select "This feature will be installed on local hard drive."
The file jdk-1_5_0_<version>-windows-i586-i.exe
is the JDK installer. If you downloaded it instead of running it directly from the web site, double-click on the installer's icon. Then follow the instructions the installer provides. The installer may ask you to reboot your computer. When done with the installation, you can delete the download file to recover disk space.
Notes -- Trying to install the JDK on a non-supported version of Microsoft Windows or on a machine that doesn't have a sufficiently up-to-date Service Pack will cause the installer to generate this warning: "We recommend that you do not install this Java platform for the following reasons: This Java platform does not support the operating system or operating-system service pack on this machine." See the system requirements above for information on supported configurations of Microsoft Windows.
Installed Directory Tree
The JDK has the directory structure shown below.
jdk1.5.0_<version>
____________________|___________________
| | | | | | | | |
| | | | bin lib | demo |
| | | LICENSE | | | jre
| | COPYRIGHT | __|__
| README.txt include | |
readme.html bin lib
In addition, the Java Plug-in and Java Web Start will automatically be installed. Look for a Java Web Start icon on your desktop. There will also be an entry for Java Web Start in the Start -> Programs menu.
Java Web Start --
jnlp
; MIME Type is application/x-java-jnlp-file
. It should be handled by the javaws
executable file in your Java Web Start directory. Also note that, due to a problem with the JavaScript in Netscape 6.x/7.x, you must use the non-JavaScript version of the demos page4. If you want to run Netscape 7.x/Mozilla 1.x with Java Plug-in, do this:
5. Update the PATH variable (Optional)
You can run the JDK without setting the PATH variable, or you can optionally set it as a convenience.
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the JDK executables ( javac.exe
, java.exe
, javadoc.exe
, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:
C:> "\Program Files\Java\jdk1.5.0_<version>\bin\javac" MyClass.java
It's useful to set the PATH permanently so it will persist after rebooting.
How do I set the PATH permanently?
To set the PATH permanently, add the full path of the jdk1.5.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.5.0_<version>\bin. Set the PATH as follows, according to whether you are on Microsoft Windows NT or 98/2000/ME.
Microsoft Windows NT, 2000, and XP - To set the PATH permanently:
Choose Start, Settings, Control Panel, and double-click System. On Microsoft Windows NT, select the Environment tab; on Microsoft Windows 2000 select the Advanced tab and then Environment Variables. Look for "Path" in the User Variables and System Variables. If you're not sure where to add the path, add it to the right end of the "Path" in the User Variables. A typical value for PATH is:
C:\Program Files\Java\jdk1.5.0_<version>\bin
Capitalization doesn't matter. Click "Set", "OK" or "Apply".
The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a JDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to jdk1.5.0_<version>\bin.
The new path takes effect in each new Command Prompt window you open after setting the PATH variable.
Microsoft Windows 98 - To set the PATH permanently, open the AUTOEXEC.BAT file and add or change the PATH statement as follows:
Start the system editor. Choose "Start", "Run" and enter sysedit, then click OK. The system editor starts up with several windows showing. Go to the window that is displaying AUTOEXEC.BAT
Look for the PATH statement. (If you don't have one, add one.) If you're not sure where to add the path, add it to the right end of the PATH. For example, in the following PATH statement, we have added the bin directory at the right end:
PATH C:\WINDOWS;C:\WINDOWS\COMMAND
;"C:\PROGRAM FILES\JAVA\JDK1.5.0_<version>\BIN"
Capitalization doesn't matter. The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows searches for programs in the PATH directories in order, from left to right. You should only have one bin directory for a JDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to jdk1.5.0_<version>.
To make the path take effect in the current Command Prompt window, execute the following:
C:> c:\autoexec.bat
To find out the current value of your PATH, to see if it took effect, at the command prompt, type:
C:> path
Microsoft Windows ME - To set the PATH permanently:
From the start menu, choose programs, accessories, system tools, and system information. This brings up a window titled "Microsoft Help and Support". From here, choose the tools menu, then select the system configuration utility. Click the environment tab, select PATH and press the edit button. Now add the JDK to your path as described in step b above. After you've added the location of the JDK to your PATH, save the changes and reboot your machine when prompted.
6. Start using the JDK!
Your computer system should now be ready to use the JDK. In this step, you'll run some simple commands to make sure it is working properly.
If you are new to developing and running programs in the Java programming language, see The Java Tutorial online for some guidance. Note especially the tutorial trails under the heading Trails Covering the Basics.
You can also download the JDK documentation from the JDK download page.
Uninstalling the JDK
If you should ever want to uninstall the JDK, use the "Add/Remove Programs" utility in the Microsoft Windows Control Panel. As an alternative method, if you still have the original installation program that you used to install the JDK, you can double click on it to launch an uninstall program.
jre/bin/client/jvm.dll
(on x86)
jre/bin/server/jvm.dll
(on x86)
jre/bin/server/jvm.dll
(on IA64)
Below are some tips for working around problems that are sometimes seen during or following an installation.
An error occured while downloading the file
http://www.installengine.com/Msiengine20/instmsiw.exe.
What would you like to do?
The online installer of version 5.0 of JDK or JRE (as opposed to the offline installer) requires Microsoft Windows Installer 2.0 to be on your machine; if it is not found (or an older version is found), then the process automatically tries to download Microsoft Windows Installer 2.0.
If this procedure fails, return to the download page and use the Windows Offline Installation, which includes Microsoft Windows Installer 2.0.
Alternatively, you can manually download Microsoft Windows Installer 2.0 by going to microsoft.com and searching for "Windows Installer 2.0".
Version 2.0 of Microsoft Windows Installer is included in Windows XP and Windows 2000 Service Pack 3, but not in earlier versions of Windows.
To see which version of Microsoft Windows Installer is installed, do the following:
config.nt. The system file is not suitable for running MS-DOS
and Microsoft Windows Applications.
it indicates a problem with the %SystemRoot%\System32\COMMAND.COM file that has been seen on some installations of Microsoft Windows 2000. If you encounter this error message when you try to launch the installer, consult the Microsoft web site at:
http://support.microsoft.com/support/kb/articles/Q142/2/71.asp
for information about resolving the problem.
corrupt cabinet file
then the file you have downloaded is corrupted. (A cabinet file contains compressed application, data, resource and DLL files.) Check its file size against the expected file size listed in these instructions. If they don't match, try downloading the bundle again.
System Error during Decompression
then you might not have enough space on the disk that contains your TEMP directory.
This program cannot be run in DOS mode.
then do the following:
C:\Program Files\jdk1.5.0\jre
) whose location is known only to the JDK. On the other hand, the public JRE can be used by other Java applications, is contained outside the JDK (typically at C:\Program Files\Java\jre1.5.0
), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft), can be removed using Add/Remove Programs, might or might not be registered with browsers, and might or might not have java.exe copied to the Windows system directory (making it the default system Java platform or not). .txt
extension to the filename. Therefore, a file you name Test.java
is saved as Test.java.txt
. It's important to note that you cannot see the .txt
extension unless you turn on the viewing of file extensions (in Microsoft Windows Explorer, uncheck "Hide file extensions for known file types" under Folder Options). To prevent the .txt
extension, enclose the filename in quotation marks, such as "Test.java"
, when typing it into the Save As dialog box.On the other hand, Microsoft WordPad does not add a file extension if you provide one -- you must save the file as "Text Document".
To prevent this problem, make sure that the user and system locales are identical, and that the installation path only contains characters that are part of the system locale's code page. User and system locales can be set in the Regional Options or Regional Settings control panel.
The associated bug number is 4895647.
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.