How to install java

How to install java

How to Install Java on Windows

Home » DevOps and Development » How to Install Java on Windows

The Java Development Kit (JDK) is software used for Java programming, along with the Java Virtual Machine (JVM) and the Java Runtime Environment (JRE). The JDK includes the compiler and class libraries, allowing developers to create Java programs executable by the JVM and JRE.

In this tutorial, you will learn to install the Java Development Kit on Windows.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Note: Develop your core app services on PNAP’s Bare Metal Cloud servers to ensure superior performance. It’s cloud native and the perfect environment for the entire SDLC.

Check if Java Is Installed

Before installing the Java Development Kit, check if a Java version is already installed on Windows. Follow the steps below:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

The command outputs the Java version on your system. If Java isn’t installed, the output is a message stating that Java isn’t recognized as an internal or external command.

Note: If you need to set up Java on a different system, check out our tutorials for installing Java on Ubuntu, Fedora, Raspberry Pi, CentOS 8, and CentOS 7.

Download Java for Windows 10

Download the latest Java Development Kit installation file for Windows 10 to have the latest features and bug fixes.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Wait for the download to complete.

Install Java on Windows 10

After downloading the installation file, proceed with installing Java on your Windows system.

Follow the steps below:

Step 1: Run the Downloaded File

Double-click the downloaded file to start the installation.

Step 2: Configure the Installation Wizard

After running the installation file, the installation wizard welcome screen appears.

1. Click Next to proceed to the next step.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

2. Choose the destination folder for the Java installation files or stick to the default path. Click Next to proceed.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

3. Wait for the wizard to finish the installation process until the Successfully Installed message appears. Click Close to exit the wizard.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Set Environmental Variables in Java

Set Java environment variables to enable program compiling from any directory. To do so, follow the steps below:

Step 1: Add Java to System Variables

1. Open the Start menu and search for environment variables.

2. Select the Edit the system environment variables result.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

3. In the System Properties window, under the Advanced tab, click Environment Variables…

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

4. Under the System variables category, select the Path variable and click Edit:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

5. Click the New button and enter the path to the Java bin directory:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Note: The default path is usually C:\Program Files\Java\jdk-17.0.1\bin.

6. Click OK to save the changes and exit the variable editing window.

Step 2: Add JAVA_HOME Variable

Some applications require the JAVA_HOME variable. Follow the steps below to create the variable:

1. In the Environment Variables window, under the System variables category, click the New… button to create a new variable.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

2. Name the variable as JAVA_HOME.

3. In the variable value field, paste the path to your Java jdk directory and click OK.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

4. Confirm the changes by clicking OK in the Environment Variables and System properties windows.

Test the Java Installation

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

If installed correctly, the command outputs the Java version. Make sure everything works by writing a simple program and compiling it. Follow the steps below:

Step 1: Write a Test Java Script

1. Open a text editor such as Notepad++ and create a new file.

2. Enter the following lines of code and click Save:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

3. Name the file and save it as a Java source file (*.java).

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Note: When using Notepad, select All files for the Save as type option and add the .java extension to the file name.

Step 2: Compile the Test Java Script

1. In the command prompt, change the directory to the file’s location and use the following syntax to compile the program:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

After a successful compilation, the program generates a .class file in the file directory.

2. Run the program with the following syntax:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

The output shows that the program runs correctly, displaying the Hello world! message.

This tutorial showed how to install the Java Development Kit on a Windows system. If you are interested in learning more about Java, read our list of 13 best Java IDEs for writing, debugging, and testing Java code.

9 Installation of the JDK and the JRE on Microsoft Windows Platforms

This topic includes the following sections:

System Requirements for Installing the JDK and the JRE on 64-Bit Windows Platform

The JDK and the JRE have minimum processor, disk space, and memory requirements for 64-bit Windows platform.

Before installing the JDK or the JRE on your 64-bit Windows platform, you must verify that it meets the following minimum processor, disk space, and memory requirements.

Both the JDK and JRE require at minimum a Pentium 2 266 MHz processor.

Disk Space Requirements

For JDK 9, you are given the option of installing the following features:

Public Java Runtime Environment

When you install 64-bit JDK, then 64-bit public JRE also gets installed. The following table provides the disk requirements for the installed features:

JDKInstalled Image
Development Tools: 64-bit platform500 MB
Source Code54.2 MB
JREInstalled Image
Public Java Runtime Environment200 MB
Java Update2 MB

On Windows 64-bit operating systems, the Java runtime requires a minimum of 128 MB of memory.

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.

JDK and JRE Installation Instruction Notation for Windows

For any text in this document that contains the following notation, you must substitute the appropriate update version number:

JDK Installation Instructions for Windows

You run a self-installing executable file to unpack and install the JDK on Windows computers.

Install JDK on Windows computers by performing the actions described in the following topics:

Downloading the JDK Installer

Verify the successful completion of file download by comparing the file size on the download page and your local drive.

Running the JDK Installer

Installing the JDK Silently

Instead of double-clicking or opening the JDK installer, you can perform a silent, noninteractive, JDK installation by using command-line arguments.

Installation ScenarioCommand
Install JDK and public JRE in silent mode.
Install development tools and source code in silent mode but not the public JRE.
Install development tools, source code, and the public JRE in silent mode.
Install the public JRE in the specified directory C:\test in silent mode.

Setting the PATH Environment Variable

It is useful to set the PATH variable permanently for JDK 9 so that it is persistent after rebooting.

The PATH variable is set automatically for the JRE. This topic only applies to the JDK.

If you do not set the PATH variable, then you must specify the full path to the executable file every time that you run it. For example:

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. 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 instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window that you open after setting the PATH variable.

The following is a typical value for the PATH variable:

JRE Installation Instructions for Windows

When installing JRE on Windows computers, you must select the JRE installer that is appropriate for your Windows system.

The 64-bit Windows operating systems come with a 64-bit Internet Explorer (IE) browser as the standard (default) for viewing web pages.

Install JRE on Windows computers by performing the actions described in the following topics:

JRE Proxy Settings and Authentication

To use the Windows Online Installer, you must be connected to the internet.

If you are running behind a proxy server, then you must have your proxy settings correctly configured. If they are not configured, or are incorrectly configured, then the installer will terminate with the following message:

If you see this message, check your proxy settings:

If you do not know what the correct settings should be, check with your internet provider or system administrator.

Downloading the JRE Installer

The JRE Installer is located on the Java SE Runtime Environment 9 Downloads page.

The following JRE installers are available for you to download:

Windows Offline: jre-9. minor.security.patch _windows-x64_bin.exe

Windows: jre-9. minor.security.patch _windows-x64_bin.tar.gz

The Windows Offline installer and Windows installer contains everything that is required to install the JRE.

The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.

Running the JRE Installer

Windows Registry Settings

The installation program for the Microsoft Windows version of the Java SE Runtime Environment uses the registry to store path and version information.

It creates the following registry keys:

JavaHome : the full path name of the directory in which the JRE is installed

RuntimeLib : the full path name of the Java runtime DLL

HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Web Start\

This key is created for Java Web Start.

If there are two versions of JDK or JRE installed on a system, one with the new version-string format introduced in JDK 9, and the other with the older version format, then there will be two different CurrentVersion registry key values. For example, if JDK 1.8.0 and JDK 9 are installed, then the following registry keys are created:

«HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit» for JDK 1.8.0 and «HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK» for JDK 9.

The registry layout for this example is:

The @CurrentVersion is a registry string in the «JDK» or «Java Development Kit» key.

For the same example, if the JRE is installed, then the registry layout is:

The @CurrentVersion is a registry string in the «JRE» or «Java Runtime Environment» key.

Beginning to Use the JDK

Use the Java item in the Windows Start menu to access essential Java information and functions, including Help, API documentation, the Java Control Panel, checking for updates, and Java Mission Control.

Java Start Menu Installed by JDK

During JDK install, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java Development Kit folder is created in the Windows Start menu, which contains the following items:

Reference Documentation : Opens the Online API documentation web page.

Java Mission Control : Opens the Java Mission Control profiling and diagnostics tools suite.

Java Mission Control is a commercial feature available to users with a Java SE Advanced license.

During JDK installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JDK version on the system

Java Start Menu Installed by JRE

During JRE installation, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java folder is created in the Windows Start menu, which contains the following items:

About Java : Opens the Java Control Panel with focus on the General tab. The tab displays the latest JRE version installed on the system.

Check for Updates : Opens the Java Control Panel with focus on the Update tab

Configure Java : Opens the Java Control Panel with focus on the General tab

Get Help : Opens the Java Help Center

Visit Java.com : Opens the Java Download page

During JRE installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JRE version on the system.

Java Web Start

Java Web Start is an application-deployment technology that gives you the power to run full-featured applications with a single click from your web browser.

Upgrading from Previous Versions

If you have a previous version 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. The new version will write over previous installations and automatically update browsers to use the new version. The configuration files and the program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade because Java Web Start will translate your settings to the new form.

The only way to uninstall Java Web Start is to uninstall the JDK or JRE. Uninstalling the JDK or JRE will not, however, remove the cache for previous versions of Java Web Start. Previous releases have separate uninstallation instructions for Java Web Start.

You may see a misleading message if you do the following:

Download and cache a Java Web Start application with the JDK or JRE.

When you remove the application, you see an Uninstaller Error dialog box 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 box 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.

To avoid seeing the misleading message, either press F5 or reopen the dialog box. Any Java Web Start application that was downloaded and cached with the JDK or JRE will no longer appear in the list of currently installed programs.

Java Plug-in

Java Plug-in technology, included as part of the JRE, establishes a connection between popular browsers and the Java platform. This connection enables applets on websites to be run within a browser on the desktop.

The Java Plug-in is automatically enabled for supported web browsers during installation of the JRE. No user intervention is necessary.

In Java SE 9, the version of the Java Plug-in that is available in versions of the JRE prior to Java SE 6 Update 10 has been deprecated. However, this earlier version of the Java Plug-in is still shipped with Java SE 9 for compatibility purposes but is no longer fully supported. It will be removed in a future release.

Option to Disable the JRE out-of-date Warning

When the installed JRE falls below the security baseline or passes its built-in expiration date, an additional warning is shown to users to update their installed JRE to the latest version. For businesses that manage the update process centrally, users attempting to update their JRE individually, may cause problems.

A deployment property, deployment.expiration.check.enabled is available that can be used to disable the JRE out of date warning. To suppress this specific warning message, add the following entry in the deployment properties file:

To disable automatic updates, on the Update tab of the Java Control Panel, deselect the Check for Updates Automatically check box.

Uninstalling the JDK on Windows

Uninstalling the JRE on Windows

Use either of the following ways to uninstall JRE:

Go to Add/Remove Programs utility in the Microsoft Windows Control Panel and uninstall the older versions of JRE.

Remove JRE using the online Java Uninstall Tool.

The Java Removal Tool is integrated with the JRE installer. After jre-9 is installed, the Java Removal Tool provides the list of outdated Java versions in the system and helps you to remove them.

The Java Uninstall tool will not run if your system administrator specified a deployment rule set in your organization.

A deployment rule set enables enterprises to manage their Java desktop environment directly and continue using legacy business applications in an environment of ever-tightening Java applet and Java Web Start application security policies. A deployment rule set enables administrators to specify rules for applets and Java Web Start applications; these rules may specify that a specific JRE version must be used. Consequently, the Java Uninstall tool will not run if it detects a deployment rule set to ensure that no required JREs are uninstalled.

JDK Installation Troubleshooting

The following sections provide tips for working around problems that are sometimes seen during or while following installation instructions.

System Error During Decompression

Program Cannot Be Run in DOS Mode

Open the MS-DOS shell or command prompt window.

Right-click the title bar.

Select the Program tab.

Ensure that the item Prevent MS-DOS-based programs from detecting Windows is not selected.

Select OK again.

Exit the MS-DOS shell.

Restart your computer.

Source Files in Notepad

Characters That Are Not Part of the System Code Page

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 generic error 1722 occurs, and installation is not completed. Error 1722 is a Windows installer error code. It indicates that the installation process has failed. The exact reason for this error is not known at this time.

To prevent this problem, ensure that the user and system locales are identical, and that the installation path contains only 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.

Windows Online Installation and Java Update FAQ

These are frequently asked questions about JDK 9 and JRE 9 online installation and Java updates on Windows computers.

1. I downloaded the installer and it is less than 1 megabyte. Why is it so small?

The Windows Online Installer for the JRE will download more installer files. Using this installer helps users to avoid downloading unnecessary files.

2. I had the Java Control Panel open for Java Update and the About tab showed the version of the JRE installed in my computer. Then I ran Java Update, and the version of the JRE that the Java Control Panel is showing has not changed. Why is this?

You need to close and restart the Java Control Panel to get the updated Control Panel.

3. Netscape/Mozilla is not working correctly with Java Plug-in. Why?

First, close all the browsers sessions. If this does not work, reboot the system and try again.

4. I try to install on the D:\ drive and Java Update is still installing files onto the C:\ drive. Why?

Regardless of whether an alternate target directory was selected, Java Update needs to install some update files on the Windows system drive.

5. How can I uninstall the Java Update version that I just installed?

7. I found the jusched.exe process running in the background of my system after installing JRE. Is there a way to shut it down?

The jusched.exe is the scheduler process of Java Update. This process runs automatically. To shut in the Java Control Panel on the Update tab, deselect the Check for Updates Automatically check box.

8. When I click the Update Now button from the Java Control Panel, it complains about the system being «offline.» What does that mean?

Java Update can be run only if the system is connected to the network. A system that is not connected to the network is referred to as being offline. When the Update Now is clicked, it will check the online/offline status of your system. If your computer does not have internet access, then the error message is displayed. Check that your system is currently connected to the internet and try again.

9. I followed the instructions to install a specific version of the JRE. After the installation, a message is displayed from system tray saying an update is available for download. What should I do?

The message is part of the Java Auto Update mechanism, which detects at user login time if a newer version of the JRE is available for download. In the system tray, click the Java Update icon to download and install the update.

10. I encountered the error «This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.» when running the Java SE installer.

There are several possible reasons for this error to be displayed; a few are listed:

Network connection fails.

Download manager software interrupts the download process.

Another application, such as an antivirus application, may interrupt the installation process.

To address these problems, ensure that the third-party downloader applications are turned off and the network connection is configured properly. Also, if a proxy is in use, then ensure that the proxy authentication is turned off.

11. I encountered the error «Error 1722. There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.»

See Error 1722: Problem with Windows Installer Package. If you encounter any other errors or issues, then you can access Java Help Center, which contains solutions for issues that you might encounter when downloading and installing Java on your system. In particular, you can search for solutions by error number. Searching for «Error 1722» returns a solution to this issue.

9 Installation of the JDK and the JRE on Microsoft Windows Platforms

This topic includes the following sections:

System Requirements for Installing the JDK and the JRE on 64-Bit Windows Platform

The JDK and the JRE have minimum processor, disk space, and memory requirements for 64-bit Windows platform.

Before installing the JDK or the JRE on your 64-bit Windows platform, you must verify that it meets the following minimum processor, disk space, and memory requirements.

Both the JDK and JRE require at minimum a Pentium 2 266 MHz processor.

Disk Space Requirements

Public Java Runtime Environment

When you install 64-bit JDK, then 64-bit public JRE also gets installed. The following table provides the disk requirements for the installed features:

JDKInstalled Image
Development Tools: 64-bit platform500 MB
Source Code54.2 MB
JREInstalled Image
Public Java Runtime Environment200 MB
Java Update2 MB

On Windows 64-bit operating systems, the Java runtime requires a minimum of 128 MB of memory.

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.

JDK and JRE Installation Instruction Notation for Windows

For any text in this document that contains the following notation, you must substitute the appropriate update version number:

JDK Installation Instructions for Windows

You run a self-installing executable file to unpack and install the JDK on Windows computers.

Install JDK on Windows computers by performing the actions described in the following topics:

Downloading the JDK Installer

Verify the successful completion of file download by comparing the file size on the download page and your local drive.

Running the JDK Installer

Installing the JDK Silently

Instead of double-clicking or opening the JDK installer, you can perform a silent, noninteractive, JDK installation by using command-line arguments.

Installation ScenarioCommand
Install JDK and public JRE in silent mode.
Install development tools and source code in silent mode but not the public JRE.
Install development tools, source code, and the public JRE in silent mode.
Install the public JRE in the specified directory C:\test in silent mode.

Setting the PATH Environment Variable

It is useful to set the PATH variable permanently for JDK 10 so that it is persistent after rebooting.

The PATH variable is set automatically for the JRE. This topic only applies to the JDK.

If you do not set the PATH variable, then you must specify the full path to the executable file every time that you run it. For example:

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. 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 instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window that you open after setting the PATH variable.

The following is a typical value for the PATH variable:

JRE Installation Instructions for Windows

When installing JRE on Windows computers, you must select the JRE installer that is appropriate for your Windows system.

The 64-bit Windows operating systems come with a 64-bit Internet Explorer (IE) browser as the standard (default) for viewing web pages.

Install JRE on Windows computers by performing the actions described in the following topics:

JRE Proxy Settings and Authentication

To use the Windows Online Installer, you must be connected to the internet.

If you are running behind a proxy server, then you must have your proxy settings correctly configured. If they are not configured, or are incorrectly configured, then the installer will terminate with the following message:

The installer cannot proceed with the current Internet Connection settings.

Please visit the following website for more information.

If you see this message, check your proxy settings:

If you do not know what the correct settings should be, check with your internet provider or system administrator.

Downloading the JRE Installer

The JRE Installer is located on the Java SE Runtime Environment 10 Downloads page.

The following JRE installers are available for you to download:

The Windows Offline installer and Windows installer contains everything that is required to install the JRE.

The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.

Running the JRE Installer

Windows Registry Settings

The installation program for the Microsoft Windows version of the Java SE Runtime Environment uses the registry to store path and version information.

It creates the following registry keys:

JavaHome : the full path name of the directory in which the JRE is installed

RuntimeLib : the full path name of the Java runtime DLL

HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Web Start\

This key is created for Java Web Start.

The registry layout for this example is:

The @CurrentVersion is a registry string in the «JDK» or «Java Development Kit» key.

For the same example, if the JRE is installed, then the registry layout is:

The @CurrentVersion is a registry string in the «JRE» or «Java Runtime Environment» key.

Beginning to Use the JDK

Use the Java item in the Windows Start menu to access essential Java information and functions, including Help, API documentation, the Java Control Panel, checking for updates, and Java Mission Control.

Java Start Menu Installed by JDK

During JDK install, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java Development Kit folder is created in the Windows Start menu, which contains the following items:

Reference Documentation : Opens the Online API documentation web page.

Java Mission Control : Opens the Java Mission Control profiling and diagnostics tools suite.

Java Mission Control is a commercial feature available to users with a Java SE Advanced license.

During JDK installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JDK version on the system

Java Start Menu Installed by JRE

During JRE installation, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java folder is created in the Windows Start menu, which contains the following items:

About Java : Opens the Java Control Panel with focus on the General tab. The tab displays the latest JRE version installed on the system.

Check for Updates : Opens the Java Control Panel with focus on the Update tab

Configure Java : Opens the Java Control Panel with focus on the General tab

Get Help : Opens the Java Help Center

Visit Java.com : Opens the Java Download page

During JRE installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JRE version on the system.

Java Web Start

Java Web Start is an application-deployment technology that gives you the power to run full-featured applications with a single click from your web browser.

Upgrading from Previous Versions

If you have a previous version 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. The new version will write over previous installations and automatically update browsers to use the new version. The configuration files and the program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade because Java Web Start will translate your settings to the new form.

The only way to uninstall Java Web Start is to uninstall the JDK or JRE. Uninstalling the JDK or JRE will not, however, remove the cache for previous versions of Java Web Start. Previous releases have separate uninstallation instructions for Java Web Start.

You may see a misleading message if you do the following:

Download and cache a Java Web Start application with the JDK or JRE.

When you remove the application, you see an Uninstaller Error dialog box 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 box 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.

To avoid seeing the misleading message, either press F5 or reopen the dialog box. Any Java Web Start application that was downloaded and cached with the JDK or JRE will no longer appear in the list of currently installed programs.

Java Plug-in

Java Plug-in technology, included as part of the JRE, establishes a connection between popular browsers and the Java platform. This connection enables applets on websites to be run within a browser on the desktop.

The Java Plug-in is automatically enabled for supported web browsers during installation of the JRE. No user intervention is necessary.

Option to Disable the JRE Out-of-Date Warning

When the installed JRE falls below the security baseline or passes its built-in expiration date, an additional warning is shown to users to update their installed JRE to the latest version. For businesses that manage the update process centrally, users attempting to update their JRE individually, may cause problems.

A deployment property, deployment.expiration.check.enabled is available that can be used to disable the JRE out of date warning. To suppress this specific warning message, add the following entry in the deployment properties file:

To disable automatic updates, on the Update tab of the Java Control Panel, deselect the Check for Updates Automatically check box.

Uninstalling the JDK on Windows

Uninstalling the JRE on Windows

Use either of the following ways to uninstall JRE:

Go to Add/Remove Programs utility in the Microsoft Windows Control Panel and uninstall the older versions of JRE.

Remove JRE using the online Java Uninstall Tool.

The Java Removal Tool is integrated with the JRE installer. After JRE 10 is installed, the Java Removal Tool provides the list of outdated Java versions in the system and helps you to remove them.

The Java Uninstall tool will not run if your system administrator specified a deployment rule set in your organization.

A deployment rule set enables enterprises to manage their Java desktop environment directly and continue using legacy business applications in an environment of ever-tightening Java applet and Java Web Start application security policies. A deployment rule set enables administrators to specify rules for applets and Java Web Start applications; these rules may specify that a specific JRE version must be used. Consequently, the Java Uninstall tool will not run if it detects a deployment rule set to ensure that no required JREs are uninstalled.

JDK Installation Troubleshooting

The following sections provide tips for working around problems that are sometimes seen during or while following installation instructions.

System Error During Decompression

Program Cannot Be Run in DOS Mode

Open the MS-DOS shell or command prompt window.

Right-click the title bar.

Select the Program tab.

Ensure that the item Prevent MS-DOS-based programs from detecting Windows is not selected.

Select OK again.

Exit the MS-DOS shell.

Restart your computer.

Source Files in Notepad

Characters That Are Not Part of the System Code Page

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 generic error 1722 occurs, and installation is not completed. Error 1722 is a Windows installer error code. It indicates that the installation process has failed. The exact reason for this error is not known at this time.

To prevent this problem, ensure that the user and system locales are identical, and that the installation path contains only 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.

Windows Online Installation and Java Update FAQ

These are frequently asked questions about JDK 10 and JRE 10 online installation and Java updates on Windows computers.

1. I downloaded the installer and it is less than 1 megabyte. Why is it so small?

The Windows Online Installer for the JRE will download more installer files. Using this installer helps users to avoid downloading unnecessary files.

2. I had the Java Control Panel open for Java Update and the About tab showed the version of the JRE installed in my computer. Then I ran Java Update, and the version of the JRE that the Java Control Panel is showing has not changed. Why is this?

You need to close and restart the Java Control Panel to get the updated Control Panel.

3. Netscape/Mozilla is not working correctly with Java Plug-in. Why?

First, close all the browsers sessions. If this does not work, reboot the system and try again.

4. I try to install on the D:\ drive and Java Update is still installing files onto the C:\ drive. Why?

Regardless of whether an alternate target directory was selected, Java Update needs to install some files on the Windows system drive.

5. How can I uninstall the Java Update version that I just installed?

7. I found the jusched.exe process running in the background of my system after installing JRE. Is there a way to shut it down?

The jusched.exe is the scheduler process of Java Update. This process runs automatically. To shut in the Java Control Panel on the Update tab, deselect the Check for Updates Automatically check box.

8. When I click the Update Now button from the Java Control Panel, it complains about the system being «offline.» What does that mean?

Java Update can be run only if the system is connected to the network. A system that is not connected to the network is referred to as being offline. When the Update Now is clicked, it will check the online/offline status of your system. If your computer does not have internet access, then the error message is displayed. Check that your system is currently connected to the internet and try again.

9. I followed the instructions to install a specific version of the JRE. After the installation, a message is displayed from system tray saying an update is available for download. What should I do?

The message is part of the Java Auto Update mechanism, which detects at user login time if a newer version of the JRE is available for download. In the system tray, click the Java Update icon to download and install the update.

10. I encountered the error «This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.» when running the Java SE installer.

There are several possible reasons for this error to be displayed; a few are listed:

Network connection fails.

Download manager software interrupts the download process.

Another application, such as an antivirus application, may interrupt the installation process.

To address these problems, ensure that the third-party downloader applications are turned off and the network connection is configured properly. Also, if a proxy is in use, then ensure that the proxy authentication is turned off.

11. I encountered the error «Error 1722. There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.»

See Error 1722: Problem with Windows Installer Package. If you encounter any other errors or issues, then you can access Java Help Center, which contains solutions for issues that you might encounter when downloading and installing Java on your system. In particular, you can search for solutions by error number. Searching for «Error 1722» returns a solution to this issue.

. как установить Java на Windows?

Эта инструкция устарела, используйте вместо неё более новую

Во многих моих тренингах так или иначе используется Java, либо как язык программирования для разработки автотестов, либо как виртуальная машина для запуска приложений, написанных на Java — инструментов тестирования, сред разработки, и даже клиент системы видеоконференций GotoWebinar требует наличия Java.

Поэтому я решил описать процедуру установки Java для операционной системы Windows и последующей настройки системы, потому что, к сожалению, недостаточно просто “запустить инсталлятор и всегда нажимать кнопку Next”.

1. Где взять Java?

2. Какую версию выбрать?

Разумеется, последнюю доступную (на момент написания инструкции это Java 8).

Выбирая из 32-битной и 64-битной версий, берите 64-битную, если ваша операционная система это позволяет, потому что у неё менее строгие ограничения по памяти, доступной исполняемым Java-приложениям.

3. Что устанавливать, JRE или JDK?

Java Runtime Environment, или JRE — это виртуальная машина, позволяющая запускать приложения, написанные на языке программирования Java.

Java Development Kit, или JDK — это набор инструментов, для разработки программ на языке программирования Java (компилятор, архиватор, генератор документации и прочие). JRE разумеется тоже входит в дистрибутив JDK.

Правило очень простое: если вы собираетесь что-нибудь писать на языке программирования Java, значит вам потребуется JDK. А если только запускать готовые программы — тогда достаточно JRE.

4. Установка Java

Вот тут, действительно, всё просто — нужно запустить инсталлятор и следовать указаниям визарда. Можно просто всё время нажимать кнопку Next.

5. Настройка переменных окружения

К сожалению, инсталлятор Java не выполняет настройку переменных окружения, поэтому придётся сделать это вручную после установки.

Для установки переменных окружения сначала нужно открыть свойства компьютера, либо использовав сочетание клавиш Win-Pause, либо через меню “Пуск”:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Затем нужно выбрать “Дополнительные параметры системы”, в открывшемся диалоге перейти на вкладку “Дополнительно” и нажать кнопку “Переменные среды”, после чего появится диалог настройки переменных окружения.

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

И сохранить всё это, закрыв все открытые диалоги в обратном порядке кнопками OK.

6. Удаление лишних файлов

Однако иногда бывает и наоборот, находятся «лишние» исполняемые файлы:

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Происходит это из-за того, что инсталлятор Java вместо того, чтобы правильно настроить переменные окружения, пытается положить исполняемые файлы в директорию C:\Windows\system32

How to install java. Смотреть фото How to install java. Смотреть картинку How to install java. Картинка про How to install java. Фото How to install java

Автор: Алексей Баранцев

Если вам понравилась эта статья, вы можете поделиться ею в социальных сетях (кнопочки ниже), а потом вернуться на главную страницу блога и почитать другие мои статьи.
Ну а если вы не согласны с чем-то или хотите что-нибудь дополнить – оставьте комментарий ниже, может быть это послужит поводом для написания новой интересной статьи.

15 JDK Installation for Microsoft Windows

This page describes how to install and uninstall JDK 8 for Windows.

The page has these topics:

See «JDK 8 and JRE 8 Installation Start Here» for general information about installing JDK 8 and JRE 8.

System Requirements

See http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html for information about supported platforms, operating systems, and browsers.

See «Windows System Requirements for JDK and JRE» for minimum processor, disk space, and memory requirements.

The JDK and JRE have a version string that enables you to determine the version number. See http://www.oracle.com/technetwork/java/javase/jdk8-naming-2157130.html for information about Java SE 8 version numbers.

The JDK has the option of installing the public JRE. For more information about JRE installation, see «JRE Installation for Microsoft Windows».

Installation Instructions Notation

For any text in this document that contains the following notation, you must substitute the appropriate update version number:

Installation Instructions

In these instructions, you run the self-installing executable file to unpack and install the JDK. As part of the JDK, this installation includes an option to include the public Java Runtime Environment. (The JDK also contains a private JRE for use only by its tools; see «Private Versus Public JRE» for more information.)

Install the JDK by doing the following:

Downloading the Installer

If you save the self-installing executable file to disk without running it from the download page at the web site, note the file size specified on the download page. After the download has completed, verify that you have downloaded the complete file.

Running the JDK Installer

You must have administrative permissions in order to install the JDK on Microsoft Windows.

Installers for JDK 7u6 and later install the JavaFX SDK and integrate it into the JDK installation directory. Installers for JDK 7u2 to 7u5 install the JDK first, then start the JavaFX SDK installer, which installs JavaFX SDK in the default directory C:\Program Files\Oracle\JavaFX 2.0 SDK or C:\Program Files (x86)\Oracle\JavaFX 2.0 SDK on 64-bit operating systems. If you want to install the JavaFX SDK (version 2.0.2) with JDK 7u1 or earlier, see http://docs.oracle.com/javafx/2/installation/jfxpub-installation.htm for more information.

Java Start Menu

Starting with JDK 7u40 release, Java menu items are added to the Windows Start Menu to provide easy access to Java resources.

During JDK install, a Java Development Kit folder is created in the Windows Start Menu, which contains the following items:

Reference Documentation: Opens the Online API documentation web page.

Java Mission Control: Opens the Java Mission Control profiling and diagnostics tools suite.

During JDK install and uninstall processes, the appropriate start menu items are updated to be associated with the latest JDK version on the system

Java Mission Control is a commercial feature available to users with a Java SE Advanced license.

Installing the JDK Silently

Installation ScenarioCommand
Install the public JRE in silent mode
Install development tools and source code in silent mode but not the public JRE
Install development tools, source code, and the public JRE in silent mode
Install the public JRE in the specified directory C:\test\ in silent mode

Updating the PATH Environment Variable

If you do not set the PATH variable, you need to specify the full path to the executable file every time you run it, such as:

It is useful to set the PATH variable permanently so it will persist after rebooting.

Click Start, then Control Panel, then System.

Click Advanced, then Environment Variables.

Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value for the PATH variable:

The PATH environment variable is a series of directories separated by semicolons ( ; ) and is not case-sensitive. 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 instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window you open after setting the PATH variable.

Starting to Use the JDK

Use the Java item in the Windows Start menu to get access to essential Java information and functions, including help, API documentation, the Java Control Panel, checking for updates, and Java Mission Control.

If you are new to developing and running programs in the Java programming language, see http://docs.oracle.com/javase/tutorial for some guidance. Note especially the tutorial trails under the heading Trails Covering the Basics.

Uninstalling the JDK

To uninstall the JDK, use the «Add/Remove Programs» utility in the Microsoft Windows Control Panel.

Uninstalling the JDK in Silent Mode

You can use the command line for uninstalling the JDK.

For example, to uninstall Java 8 update 251, run the command:

This command can be run from anywhere.

The msiexec.exe executable is located in the windows system directory.

A reboot is required only if some files are in use during uninstallation; it is not necessary everytime. However, to manually suppress reboot while uninstalling, append REBOOT=R option to the command.

setup.log» option to the command if you want to create a log file describing the uninstallation status.

Windows Installer dialog appears prompting you for confirmation. Click Yes to uninstall JDK.

Finding the JDK Registry Key and UninstallString Value

Go to Start and type regedit.

Under the Uninstall folder, you will find many registry entries within curly brackets.

Click Edit and then Find.

Highlight Uninstall folder before performing search for a particular registry.

Enter version string as value to find corresponding registry key. Follow format 1.8.0.xxx. For example, enter jre1.8.0.251.

The registry key is highlighted on the right-hand side of the pane and values of various uninstall strings are displayed on the left-hand pane.

Note the value of the UninstallString.

Installed Directory Tree

See http://docs.oracle.com/javase/8/docs/technotes/tools/windows/jdkfiles.html for a description of the directory structure of the JDK. (Note that the file structure of the JRE is identical to that of the JDK’s jre directory.)

Installation Troubleshooting

Below are some tips for working around problems that are sometimes seen during or following an installation:

Corrupt Cabinet File

If you see the error message «corrupt cabinet file,» then the file you have downloaded is corrupted. Check the file size against the expected file size listed in these instructions. If sizes do not match, try downloading the bundle again. (A cabinet file contains compressed application, data, resource, and DLL files.)

System Error During Decompression

If you see the error message «system error during decompression,» then you might not have enough space on the disk that contains your TEMP directory.

Program Cannot Be Run in DOS Mode

If you see the error message «This program cannot be run in DOS mode,» then do the following:

Open the MS-DOS shell or Command Prompt window.

Right-click the title bar.

Choose the Program tab.

Click the Advanced button.

Ensure that the item «Prevent MS-DOS-based programs from detecting Windows» is not selected.

Select OK again.

Exit the MS-DOS shell.

Restart your computer.

Private Versus Public JRE

Installing the JDK also installs a private 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.8.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.8.0 ), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft ), can be removed using Add/Remove Programs, might be registered with browsers, and might have the java.exe file copied to the Windows system directory (which would make it the default system Java platform).

Source Files in Notepad

Characters That Are Not Part of the System Code Page

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 generic error 1722 occurs, and installation is not completed. Error 1722 is a Windows Installer error code. It indicates that the installation process has failed. The exact reason for this error is not known at this time.

To prevent this problem, ensure that the user and system locales are identical, and that the installation path contains only 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.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *