Change the default JDK for NB 6.x

While its easy enough to change the default JDK for a project, in our current project we have around 5 services using 3 or 4 apis and changing the JDK for each is a PITA. Besides, all our builds are setup for command line ant (we build on Solaris, I dev on Linux, OS X and Solaris, and our production boxes are Solaris) and the ant build is setup for JDK 1.6.

So what I really wanted to do was be able to use the ant command line build to build the api's, then pull up the services that I'm working on in NB and not get a library version mismatch.

The file I needed to modify was the netbeans.conf. On a windows box (I think - from the info out there) The file is located in C:\\Program Files\\netbeans-?.?\\etc\\netbeans.conf. On a mac the file is located in Applications/NetBeans/NetBeans ?.?app/Contents/Resources/NetBeans/etc/netbeans.conf

To change the default modify the line:

# Default location of JDK, can be overridden by using --jdkhome <dir>:netbeans_jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
Comments:

Thanks for this. Installed the Netbeans 6.5 + jdk v5 bundle by accident, and couldn't find a way to set jdk v6 as default in the options.

Posted by guest on March 16, 2009 at 04:48 AM MDT #

It worked for me. Thanks for the solution.

Posted by Kaushik Borbora on June 18, 2009 at 09:28 AM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Randy Carver

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today