How to Configure Java Development Kit for NetBeans IDE in Windows 10

Posted on

How to Configure NetBeans IDE in Windows 10

After the NetBeans IDE installation process is done, as it exist in the previous article in this link, there are still lot of things left which is very important in order to use the NetBeans IDE in Windows 10 optimally. The first one is to be able to configure the (JDK) Java Development Kit for NetBeans IDE. The second one is for configuring the application server which is going to be used by NetBeans IDE. And in the next configuration which is the third one is in order to configure maven build tool in NetBeans IDE.

How to Configure JDK (Java Development Kit) for NetBeans IDE in Windows 10

This article is actually the continuation of the previous article. The previous article is actually an article focusing on how to install the NetBeans IDE. The article has the title of ‘How to Install NetBeans IDE in Windows 10’ and it exist in this link. So, in order to configure NetBeans IDE to compile and build using a specific Java Development Kit (JDK), the following steps are the sequences to achieve it :

  1. First of all, just find the NetBeans IDE configuration file. Normally, it exist in the etc folder. For an example, Configure Java Runtime Environment for NetBeans. Just add it in the netbeans.conf. So, following the path of the installation from the previous article, the location of the NetBeans IDE will be exist in C:\Program Files\netbeans-13. In that case, the NetBeans IDE configuration will be available in ‘C:\Program Files\NetBeans-13\netbeans\etc\netbeans.conf. The configuration part defining the JDK (Java Development Kit) is in this following part :

    # Default location of JDK:
    # (set by installer or commented out if launcher should decide)
    #
    # It can be overridden on command line by using --jdkhome <dir>
    # Be careful when changing jdkhome.
    # There are two NetBeans launchers for Windows (32-bit and 64-bit) and
    # installer points to one of those in the NetBeans application shortcut
    # based on the Java version selected at installation time.
    #
    #netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
    
  2. If there is a Java Development Kit (JDK) available in the machine, for an example ‘C:\Program Files\Java\jdk1.8.0_181’, just add a new line following after the last commented part with the variable name of ‘netbeans_jdkhome’. So, the overall configuration will be exist as follows :

    # Default location of JDK:
    # (set by installer or commented out if launcher should decide)
    #
    # It can be overridden on command line by using --jdkhome <dir>
    # Be careful when changing jdkhome.
    # There are two NetBeans launchers for Windows (32-bit and 64-bit) and
    # installer points to one of those in the NetBeans application shortcut
    # based on the Java version selected at installation time.
    #
    #netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
    netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_181"
    

Leave a Reply