Change Netbean's default JDK

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.

Published Tuesday, August 21, 2007 4:21 AM by lamia
Filed under: , ,

Comments

# re: Change Netbean's default JDK

Sunday, September 09, 2007 9:57 AM by Amit

Hi!

I am Amit, NetBeans Community Docs (wiki.netbeans.org/.../CommunityDocs) coordinator.

It would be great if you could add this cool tip of yours in the wiki there. Or, if that is a problem, I can do that for you. So looking forward to see your contribution there.

you can mail me at amitksaha@netbeans.org

Thanks!

# re: Change Netbean's default JDK

Wednesday, September 12, 2007 10:32 AM by Michel Graciano

I think that a wiki page about this is interesting. Maybe this exists, I don't know.

Regards.

# re: Change Netbean's default JDK

Saturday, October 25, 2008 11:08 PM by Farrokh Mehryary

Cool, i was so confused how to change this settings,

thanks a alot ;)

# re: Change Netbean's default JDK

Saturday, October 25, 2008 11:08 PM by Farrokh Mehryary

Cool, i was so confused how to change this settings,

thanks a alot ;)

# re: Change Netbean's default JDK

Saturday, October 25, 2008 11:08 PM by Farrokh Mehryary

Cool, i was so confused how to change this settings,

thanks a alot ;)

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: