JDK 5.0 Microsoft Windows (32-bit)

   

System Requirements | Installation Instructions | Troubleshooting

System Requirements

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."

Installation Instructions

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. See this note on Proxy Settings and Authentication.

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 more information about Java Update, see Enhancements and Changes. 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 --
  • Compatibility: The release of Java Web Start that comes with this JDK/JRE can be run on JDK/JRE 1.2.2 or later. It will not work with JDK/JRE 1.1.x or earlier.
  • Upgrading from Previous Versions: If you have a previous release of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start application data will have to be downloaded again. This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade, since Java Web Start will translate your settings to the new form.
  • Uninstalling JDK/JRE 5.0: (1) The only way to uninstall Java Web Start 1.5.0 is to uninstall JDK/JRE 5.0. But note that doing so will remove the 1.5.0 Java Web Start cache, which stores the Java Web Start application data. Uninstalling the JDK/JRE will not, however, remove the cache for previous releases of Java Web Start (1.0.1 and 1.2). Previous releases have separate uninstallers for Java Web Start. (2) You may see a misleading message if you do the following: first download and cache a Java Web Start (JNLP) application with JDK/JRE 5.x; next remove JDK/JRE 5.x using "Add or Remove Programs" from the Windows Control Panel; then try to remove the Java Web Start application using "Add or Remove Programs." This misleading message can occur as follows: When you select to remove the application, you will see an "Uninstaller Error" dialog saying "An error occurred while trying to remove Java-Application: <name> App. It may have already been uninstalled. Would you like to remove Java-Application: <name> App from the Add or Remove program list?" If you say yes to this, then you will see another "Uninstaller Error" dialog saying "You do not have sufficient access to remove Java-Application: <name> App from the Add or Remove Program list. Please contact your system administrator." This is the misleading message. It implies that the problem is due to privileges. It is not. The problem is that you have already removed the Java Web Start application when you removed JDK/JRE 5.x, but this is not reflected in the "Add or Remove Programs" dialog until it is refreshed by pressing F5 or it is closed and reopened. To avoid seeing this misleading message, either press F5 or close and reopen the dialog. Any Java Web Start application that was downloaded and cached with JDK/JRE 5.x will no longer appear in the list of currently installed programs.
  • Using Java Web Start with Netscape 6.x/7.x: For Netscape 6.x/7.x users, setup the Java Web Start MIME type (JNLP) in the Edit->Preferences->Navigator->Helper Applications section. The file extension is 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 page
4. If you want to run Netscape 7.x/Mozilla 1.x with Java Plug-in, do this:

 

  • Exit the Netscape 7.x/Mozilla 1.x browser and all Netscape 7.x/Mozilla 1.x "objects" (Messenger, Composer ...);
  • If the Quick Launch feature is enabled, disable it;
  • Then restart Netscape 7.x/Mozilla 1.x.

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:

 

  1. 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.

     

  2. 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:

  1. 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

     

  2. 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>.

     

  3. 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.

Location of VM Library Files (jvm.dll)

Invocation API
jre/bin/client/jvm.dll (on x86)
jre/bin/server/jvm.dll (on x86)
jre/bin/server/jvm.dll (on IA64)

Troubleshooting the Installation

Below are some tips for working around problems that are sometimes seen during or following an installation. For more troubleshooting information, see the Java FAQ.

 

  • If you see the following error message about Microsoft Windows Installer 2.0:
    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:

     

    1. Locate the file MSI.DLL. (Usually located in C:\WINNT\SYSTEM32 )
    2. Select the file and right-click on it.
    3. Choose "Properties" and click on the "Version" tab.

     

  • If you see the following error message on Microsoft Windows 2000
    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.

     

  • If you see the following error message
    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.

     

  • If you see the following error message
    System Error during Decompression
    
    then you might not have enough space on the disk that contains your TEMP directory.

     

  • If you see the following error message
    This program cannot be run in DOS mode.
    
    then do the following:

     

    1. Open the MS-DOS shell or Command Prompt window
    2. Right-click on the title bar
    3. Select Properties
    4. Choose the Program tab
    5. Push the Advanced button
    6. Make sure the item "Prevent MS-DOS-based programs from detecting Windows" is unchecked
    7. Select OK
    8. Select OK again
    9. Exit the MS-DOS shell
    10. Restart your computer.

  • Private vs. public JRE - Installing the JDK installs a private J2SE Runtime Environment (JRE) and optionally a public copy. The private JRE is required to run the tools included with the JDK. It has no registry settings and is contained entirely in a jre directory (typically at 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).

  • Creating source files in Notepad - In Microsoft Windows, when you create a new file in Microsoft Notepad and then save it for the first time, Notepad normally adds the .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".

  • Choosing an installation path containing characters that are not part of the system code page - On Windows 2000, XP, and 2003, it is possible to name directories using characters that are not part of the system locale's code page. If such a directory is part of the installation path, then error 1722 occurs, and installation is not completed.

    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.