Netbeans header

Installing NetBeans Java IDE on Microsoft Corporation's Windows 10 OS


Video intro and tutorial
Step 1: Downloads
Step 2: Environment Variable Configuration
Step 3: Extraction and Install
Step 4: Setup and Testing


The NetBeans IDE allows you to develop Java applications of almost any size--ranging from a simple, single-file program to full-scale enterprise applications consisting of thousands of classes and dependent libraries, and web servers.


Video intro and tutorial


Download, extraction, and placement

NetBeans is not Java, it's a tool for allowing easy interaction with the Java development tools which are installed separately. Why separately? It allows for modularity; since programming is about creating your own tools, folks often want to use different versions of Java, or Java tools written by different parties. By separating Java from NetBeans, you are allowed the freedom of choice for which underlying Java tools you wish to use.

Download Oracle OpenJDK

JDK stands for Java Development Kit and includes both the Java Runtime Environment (JRE) and a set of tools for writing your own Java programs. Your instructor recommends the Oracle corporation's open source JDK:

oracle open JDK

Extract and move to C:\Program Files\Java

Once you've downloaded the JDK, you'll have a .zip directory on your system, probably in your Downloads directory. Assuming this, follow these steps:

  1. Open a file browser and navigate to "My Computer" and then your primary hard drive, probably called C:. Then find your Program File directory.
  2. Create a new directory (i.e. a "Folder") inside Program Files called Java.
  3. Open a new file browser and navigate to your Downloads directory, locating your .zip file you just downloaded
  4. Right click and select something like "Extract"
  5. You'll be prompted for where you want to extract the files. Choose the C:\Program Files\Java directory you just created.
  6. Tell the system to extract the files
  7. Verify that when you look inside your Java directory you have another directory that has the words "jdk" in the name along with version numbers

Download NetBeans 12 IDE

NetBeans is free and open source. It comes in many versions, and you can use the latest version: 12, which can be downloaded as a .exe file. Note that your browser will probably warn you that downloaded a straight .exe file can be dangerous. You may be prompted to enter an administrator password. You can trust the NetBeans folks, but you should heed such warnings and think carefully when downloaded an executable file from an untrusted source, like some random website.

netbeans IDE download page

This will also probably download by default to your Downloads directory (i.e. "Folder") which is fine, since the executable file will install to its own new directories without your help--just your approval.


Step 2: Environment variable configuration

An environment variable is a named value that is accessible to any program and provided by your operating system. We will create a variable called JAVA_HOME and inject the location of your JDK extraction so the NetBeans installer can wire itself up to your Java tools.

Since this is a common task, I'll just link to an existing on mykong tutorial on how to do this.

Don't be a lemming and just do exactly as it says: make sure the file path you set for JAVA_HOME is actually the directory you created in the previous step!


Step 3: Install

With the JDK extracted, NetBeans downloaded, and your environment variable setup, locate the .exe file for the NetBeans installation. Double click it in a file browser, give administrative approval, and walk through the install steps carefully. The default locations for the install will work for most folks.


Step 4: Setup and testing

If All goes well, NetBeans installer will say "Success!" and you can now find a program called NetBeans in your start menu. Fire it up and see the glory!

You'll want to make a container for your programs, which NetBeans calls a Project. Do this by navigating:

  1. File >> New Project
  2. If you have the option of a Maven project, don't choose this. The Ant (Not "alice" as I had previously posted) build system, which is simpler than Maven, is your desired choice. On the right, select "Java Application"
  3. Name the project something like "cit111online". NetBeans will protect you from yourself and not allow spaces or weird characters. You can keep "create main class" selected for this test. See below.
  4. Then in the project browser, expand "Source Packages"
  5. You'll probably find a default created package with a corresponding class in it with the same name as the project, except for a leading Capital letter.
  6. Add a simple print statement as shown, and then navigate to run >> run file or press shift and F6. Your output should show your printed statement! If so, you're in luck! If not, look for error messages and type them into google with the words "windows 10" after it and see what help you can find
  7. If all fails, come to an office hours via Zoom and get instructor help.
netbeans project

Page created on 9-SEP-2020 and can be freely reproduced according to the site's content use agreement.