I ran across a problem with Netbeans: it stopped working (freezes, weird UI behavior while editing etc).

Turns out that an update (figures, don't update if it is working) created an incompatibility between Netbeans and the default Java JRE on Ubuntu. There are numerous bug reports, but the workaround is to install Oracle Java and use that.

Here are step-by-step instructions on how to do this: http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux
Last step you need to do is set netbeans_jdkhome to "/usr/local/java/jre1.7.0_25/" in netbeans.conf.

While I was at it I also installed Netbeans 7.3 and everything is working again. Just throwing this out there in case anyone else runs into this. And perhaps this can be addressed / taken into account for future DrupalPro versions.

Comments

mike stewart’s picture

Status: Active » Closed (won't fix)

Thanks for this info, very valuable for anyone that wants to use Netbeans. Not an option for me to fix due to licensing.

seismicmike’s picture

Does not work for me. I followed the instructions in the link and netbeans won't open now.

~/$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)

When I click the Netbeans icon nothing happens - literally...

I only use Netbeans for Xdebug anyway because Sublime Text doesn't have an Xdebug client... or at least didn't until I just discovered this: http://www.sublimetext.com/forum/viewtopic.php?f=5&t=12993 So this issue is probably moot for me personally, but it might need further debugging for those who really do want to use Netbeans.

sirtet’s picture

Worked for me, to get Netbeans 7.1.2 running again.

@seismicmike, maybe you forgot the last step above:

Last step you need to do is set netbeans_jdkhome to "/usr/local/java/jre1.7.0_25/" in netbeans.conf.

I first forgot that, what resulted in the netbeans-icon in the sidebar just to pulse a bit when clicked.

Or you forgot to adopt some of the commands in the how-to to your downloaded Java-Version, eg. i got jre1.7.0_45, but the howto uses jre1.7.0_40.

sirtet’s picture

Unfortunately, this procedure killed my custom SOLR installation (3.6.2)...

But i solved it like this:
Luckily i had a snapshot of the VM to return to. On the nex try i skipped the steps 3 and 9 to 17 of the how-to, which is, i did NOT remove the OpenJDK and did NOT register the new JRE to the system.
So i guess now only Netbeans is using it, where we configured that with the netbeans_jdkhome setting.

I hope no other problems will show up.

mike stewart’s picture

@seismicmike -- you might also try running netbeans by opening a terminal (F4 or CTRL-ALT-T) and typing:
~/netbeans-7.1.2/bin/netbeans

and then watch the output. as with most programs, you can also add the switch: --help or -h for help, like so:
~/netbeans-7.1.2/bin/netbeans --help

seismicmike’s picture

@sirtet, Yes I seem to have completely missed that. Thanks! Got me right back on track.