TaT TroubleShootNBStartUp

Tips & Tricks | Troubleshooting NetBeans Startup

[[{TableOfContentsTitle=DocStartup} | {TableOfContents title='Doc Startup'}]]


Once I had encountered a problem, that is, suppose you have installed NetBeans IDE (version 5.5 and above), you can only do so, if you have an appropriate pre-installed Java Development Kit (version 1.5 and above).

What if, after installing and running NetBeans for few months, you find out that JDK got removed somehow, either by you, while you might have formatted your OSystem OR Accidentally? Now, what to do?

When I had first encountered the problem, I screwed it up, what I did, I uninstalled the NetBeans, re-install the JDK and then installed the NetBeans, that took a hell lot of a time!

Here's The Tip

Here's the tip, goto NetBeans Installed Directory,

For Windows OSystem

Generally, its the "C:\" drive in Windows under "Program Files", then locate folder "etc", it contains the configuration file for NetBeans IDE.


I tried it on my Windows OSystem (Win XP Professional Service Pack 2), don't know about the others, should work the same way.

For Linux OSystem

Navigate to the 'etc' sub-directory in the directory where you have installed NetBeans, it would also contain the file 'netbeans.conf'. Tried on Ubuntu 7.04 (Fiesty Fawn), by Amit Kumar Saha, it works the same way.

For Mac/Solaris OSystem

Guys, try it on your OSystem, I would now prefer any Mac/Solaris user to try this out on his/her OS.

So, all Windows & Linux users, may take a backseat as this troubleshoot would be applicable on their respective Distro's.

Open "netbeans.conf"

Locating the configuration script on Windows, File:TroubleshootingNetBeans TaT TroubleShootNBStartUp.htm View the Demo, created using Wink.
You may do so, through Command-prompt (in Windows), Terminal in Unix-compliant OS (like Linux, Solaris)

# ${HOME} will be replaced by JVM user.home system property

# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:
MaxPermSize=200m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
# (Note that a default -Xmx is selected for you automatically.)

# If you specify the heap size (-Xmx) explicitely, you may also want to enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
# (see http://wiki.netbeans.org/wiki/view/FaqGCPauses)

# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_03"

# Additional module clusters, using ${path.separator} (';' on Windows or ':' on Unix):

And The Trick Is...

Look at the "Default location of JDK" header, in this document #(hash) used as single-line comment. Now, you may see under that header, there are two statements, first one is commented, its showing two JDK_HOME's because I had added the first one on my own, by default second was present, which was used to install NetBeans 6.0 and 6.1 Beta on my OSystem.

(Assuming that you have two JDK's on your OSystem) Now, considering that you are not aware of that you have lost JDK, you boot NetBeans IDE, and the following error-dialog prompts you with a message "JDK 5.0 or newer Not Found".

Don't worry, just goto the configuration file and make following changes,

# Default location of JDK, can be overridden by using --jdkhome <dir>:
#netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_03"

As my OSystem had two JDK's, so it was easier for me to switch over, else you have to reinstall JDK and run the NetBeans IDE, it will boot up normally.
Hope you may find it useful. Any suggestions/comments...

Work Ahead

Trying it out for Unix-compliant OS, as well as, for the older versions of NetBeans IDE.
If there's anyone, who would like to try this doc on his/her version of NetBeans on OSystem other than Windows.
May please contact the undersigned.


  1. prOgramming bOnds
  2. Creating a Flash Demo
  3. FaqNetbeansConf
  4. Tuning JVM Swtiches

Contributed By,

Varun Nischal
NetBeans Significant Contributor
N vArUn @ NetBeans dOt org

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo