Normally when installing NetBeans, and most other IDEs, you need to already have a Java Development Kit (JDK) installed on your device. It is sometimes useful to be able to install NetBeans together with the latest JDK for the following reasons:

> To make installation easier and more convenient.
> To use the latest JDK that won't interfere with other JDKs already installed on your device.


Fortunately, this is very straightforward to do thanks to the efforts of Neil C Smith and Geertjan Wielenga, the latter being the chair of the Apache NetBeans project.

You will find the latest combination at the following page:

At the time of writing, the latest version is NetBeans 21 with JDK 21, but updates are frequent so you will likely see something more recent.

Choose the download for your operating system. The following process and screenshots are for the Windows version, but the other operating systems should be similar.

After running the downloaded file you will first have to agree to the license: 

NetBeans license agreement

After clicking Next you will be asked whether you want to create a desktop shortcut:

Create desktop shortcut

This will be followed by the Ready to install page:

Ready to install

After clicking Install it will take a few minutes to complete, for which you will see its current progress:

Installation progress

Once installation is complete you will be prompted to launch NetBeans:

Option to launch NetBeans

If the application detects a previous version is already installed it will ask whether you want to import its settings:

Import settings

Finally, NetBeans will be launched resulting in its start-up screen:

NetBeans start-up page

If you are new to NetBeans then feel free to explore the links provided. There's a check-box where you choose to not see the page anymore on start-up, and you can of course close the tab.

If you chose to have a desktop shortcut then you might want to consider renaming the icon to append the installed version number (21 in this example): 

NetBeans version appended to desktop shortcut

This concludes the installation procedure for NetBeans with a locally integrated JDK.