User Tools

Site Tools


java:installing_openjdk_and_netbeans_on_windows

This is an old revision of the document!


Installing OpenJDK and Apache NetBeans on Windows 10

The following has been vetted for AdoptOpenJDK's OpenJDK 11 (LTS) and Apache Netbeans version 12 (LTS).

Introduction

This guide takes you through the process of installing OpenJDK and Apache Netbeans for Java development on Windows 10. To install OpenJDK, we will be using resources created by the AdoptOpenJDK project. AdoptOpenJDK greatly simplifies the process of installing OpenJDK for the typical user.

Install OpenJDK

  1. Go to the AdoptOpenJDK homepage and select the Version you want to install. I recommend you get the newest LTS release, which at this time is OpenJDK 11. Also select the JVM you want. I use the HotSpot JVM. I have no experience with OpenJ9.
  2. Click the Latest release button and save the installer someplace on your computer.
  3. Start the installer, accept the licenses, and make sure the installation options are set as given below:
    • Add to PATH: ON
    • Associate .jar: ON
    • Set JAVA_HOME variable: ON (the default if OFF)
    • JavaSoft (Oracle) registry keys: OFF
  4. Install the package.

Installation verification

If you wish, you can verify that the installation was successful by doing the following:

  1. Open a commandline prompt 1) and enter java -version. You should see something along the lines of:
    openjdk version “11.<version>” 2020-04-14
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.<version>)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.<version>, mixed mode)
  2. In the same window, enter javac -version (note the 'c' at the end of the command). You should see something along the lines of:
    javac 11.<version>

If you know how to check the system PATH and environment variables, you can additionally do the following:

  • Verify that
    C:\Program Files\AdoptOpenJDK\jdk-<version>-hotspot\bin
    is on the system PATH in front of any Oracle Java entries.
  • Verify that the system JAVA_HOME variable is set to
    C:\Program Files\AdoptOpenJDK\jdk-<version>-hotspot\bin

Install Cygwin

If you want a functioning terminal in NetBeans (and you almost certainly do), you will

Install Apache NetBeans

  1. Go to https://netbeans.org/downloads/ and click Download for the latest release.
  2. On the resulting page, under Installers, click on
    Apache-NetBeans-<version>-bin-windows-x64.exe
    and on the following page, select a mirror from which to download. Save the installer to your computer.
  3. Run the installer and walk through the steps of the wizard:
    • The installer gives you the option to customize the features you want. If you are short on storage space and will only be doing Java development outside an enterprise environment, the only options you will need are “Base IDE”, “Java SE”, and “HTML5/JavaScript”.
    • Accept the license.
    • Verify that the “JDK for Apache NetBeans IDE” is set to
      C:\Program Files\AdoptOpenJDK\jdk-<version>-hotspot
    • Allow the installer to check for updates.
    • Finish

First time run

TDB

1)
To open a commandline prompt, press the Windows key, type cmd in the search bar, and select the Commandline Prompt app.
java/installing_openjdk_and_netbeans_on_windows.1597445029.txt.gz · Last modified: 2020/08/14 22:43 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki