Skip to content

Install Java 9 on Windows

Last Updated on 15/11/2020

Java 9 custom logo


This tutorial will show how to install Java 9 on Windows and set up the necessary environment variables for application development.

Download

Visit this link to download the appropriate JDK 9 for your Windows, accepting Oracle’s license agreement.

JDK 9 download page

Installation

Run the downloaded installer and proceed with the installation, accepting the licence terms and advancing the installation steps to complete the process, without any additional settings as the following screenshots:

Install java 9 on windows - Java 9 installation welcome page
Install java 9 on windows - Java 9 installation in progress
Install java 9 on windows - Java 9 installation of web plugin welcome page
Install java 9 on windows - Java 9 installation of web plugin in progress
Install java 9 on windows - Java 9 installation success page

Environment Variables

Open the environment variables settings window by pressing Windows + Pause/Break or through Control Panel -> System -> Advanced system settings -> Environment Variables.

install-java-8-windows-environment-variables-english

Click on New… button on System environment variables and add the three following variables.

Variable nameVariable value
JAVA_HOMEJDK installation path, example: C:\Program Files\Java\jdk-9
CLASSPATH. (just a dot)
PATHIt may already exists on your system under the name Path, so edit its value by adding at the end: %JAVA_HOME%\bin; If it not exists already, create a new one with the value %JAVA_HOME%\bin;

Validating

In order to validate the Java installation and the environment variables setup, open the Command Prompt by clicking the Start Menu and type cmd. Next, type the following commands in the prompt, which should print the version information if Java has been configured correctly.

C:\Users\Bruno>java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
C:\Users\Bruno>javac -version
javac 9

I hope it helps.
Cya!

4 thoughts on “Install Java 9 on Windows”

  1. I am still getting this error ‘ ‘javac’ is not recognized as an internal or external command, operable program or batch file.

    I updated from java8 to java9. and getting this error.

    variable name JAVA_HOME
    variable value C:\Program Files\Java\jdk-9.0.1\bin

    1. Hi! Please remove the \bin from the value of your JAVA_HOME, so you will have:
      C:\Program Files\Java\jdk-9.0.1
      And make sure you set up the PATH variable as described, which already includes the \bin folder.

  2. Still getting the ‘javac’ is not recognized as an internal or external command, operable program or batch file error

    1. Hello! Have you set up the environment variables? If so, could you provide your setup so I could check, please?
      Looking forward to hear back from you.

Leave a Reply

Your email address will not be published. Required fields are marked *