Last week I uninstalled my 1.6 JDK and JRE(both of which are bundled with my netbeans 5.5 installation) because the RIM Blackberry code signing/signature tool(SignatureTool.jar) seems to be having problems when JRE 1.6 is installed. A week later I tried to fire up my Netbeans IDE and an error message appeared saying that it couldn't find the 1.6 installation folder. Being used to Java and Tomcat, I figured out that there must be a configuration for the IDE(perhaps this is a no brainer at all). I browsed through my Netbeans installation folder (C:\Program Files\netbeans-5.5) and noticed that there is an "etc" folder there. I opened that folder and found a file named "netbeans.conf". The file structure looks like this:
--------------------------------------------------------------------------------------------
# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/5.5"
# options used by netbeans launcher by default, can be overridden by explicit
# command line switches
netbeans_default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none
-J-Dapple.laf.useScreenMenuBar=true"
# --- tips for more advanced options you could use ---
# for JDKs where it is supported (for example Sun's JDK 5.0 and newer),
# you can use the following set of options which enable Concurrent Mark and
# Sweep garbage collection algorithm and improve UI responsiveness
# (see FAQ item http://wiki.netbeans.info/wiki/view/FaqGCPauses)
#netbeans_default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none
-J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled
-J-XX:+CMSPermGenSweepingEnabled"
#
# if you're processing large wsdl files(e.g. when creating or consuming web services) you should set -J-Xmx256m
instead of -J-Xmx128m
# ---
# default location of J2SE JDK, can be overridden by using --jdkhome <dir> switch
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_01"
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
--------------------------------------------------------------------------------------------
Perhaps anyone who knows what he's looking for would quickly notice this entry:
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_01"
I just changed this to my JDK 1.5 installation folder
netbeans_jdkhome="C:\Program Files\Java\jdk1.5.0_11"
and saved the file. Next time I fired up my IDE it was alive and kicking again. :)
Serioursly though... I miss the days when I wrestled configuring Tomcat 5.5 in Linux when I saw the netbeans_default_options entry. Lolz!
Note: I'm not using Netbeans for Blackberry development, I just mentioned it here as the reason why I took JDK and JRE 1.6 out of my machine.