View Full Version : [SOLVED] Netbeans not starting....help please

January 4th, 2010, 03:20 AM
I have recently just installed the netbeans IDE 6.7.1 from the Ubuntu Software Center and and can't seem to get it to start. I have a feeling this problem is happening because I previously had the 6.8 version, but instead of installing 6.8 from the software center, I did it through a regular installation file from the Netbeans website. By default it installed 6.8 to my home folder so when I decided I didnt want it, I just deleated the folder with all the program files. I understand that it wasn't the right way to remove it and I don't know why I did that. Anyway can anyone help me out.

January 4th, 2010, 04:50 AM
Open a terminal window and run "netbeans". Use copy and paste to post any errors or exceptions which result.

January 5th, 2010, 12:32 AM
just tried typing in "netbeans" and it still didn't work. This is what came up:

john@Blue-Box:~$ netbeans
Cannot find java. Please use the --jdkhome switch.

^^^p.s. I defiantly have java installed

January 5th, 2010, 02:53 AM
How did you install the JDK? Did you install it from the Ubuntu repository or download it from Sun's site? Did you install Sun's JDK or some other JDK (like OpenJDK)?

What you need to do is run netbeans from a terminal, telling it where the root of the JDK directory is. Where it is depends upon how you installed the JDK. For example, on my system, since I manually installed the Sun JDK and installed it in the home directory of a dedicated "java" user I created for the purpose, I would run netbeans like this:

netbeans --jdkhome /home/java/jdk1.6.0_17

Once you've figured out the correct directory, you can find and edit the file netbeans.conf and change the netbeans_jdkhome property to point to the JDK directory so you no longer have to use the --jdkhome option to run netbeans. Here's what that property looks like in my netbeans.conf file:

# Default location of JDK, can be overridden by using --jdkhome <dir>:

January 5th, 2010, 06:50 AM
I installed Sun JDK from package manager.

January 5th, 2010, 07:47 AM
okay, i just got netbeans to work by using the method above but now when I try to modify my netbeans.conf file it says I can't save cuz i dont have permission. how can i override this?

January 5th, 2010, 09:02 AM
Use sudo to run the editor. For example:

sudo gedit netbeans.conf

January 5th, 2010, 07:46 PM
just to verify everything, I seem the have 3 netbeans.conf files:
1.) netbeans.conf in /ect
2.) netbeans.conf in /usr/share/netbeans/6.7.1/etc (i think this one is a link)
3.) netbeans.conf.orig in/usr/share/netbeans/6.7.1/etc

which one should I be modifying?

January 5th, 2010, 08:07 PM
My guess would be either of the first two. If you edit the link, it edits the file the link points to. The .orig file is definitely not the one.

January 6th, 2010, 07:24 AM
thaank you very much for all the help!!!

April 6th, 2011, 10:18 AM
Hi Guys!!

Many thanks. This worked for me.

Ubuntu Lucid 10.04 Netbeans 6.9.1. Installed the latest version of Sun Java and my NetBeans quit.

Used the --jdkhome switch with directory = "/usr/lib/jvm/java-6-" and -- Shazzam!!! NetBeans was off roaring back down the turnpike. So nice!!

Many thanks D3mon_Spawn.

Ken "Beaucoder" in Sugar Creek, Missouri.

NetBeans, Ruby, Rails and MySQL flying high.