On my 64bit Ubuntu 12.04 on an Intel Core i3 processor which has 16Gb RAM and a M4 SSD, NetBeans is very sluggish as well as the known problem where NetBeans does not use Ubuntu 12.04's global menu. That problem aside, why is NetBeans so slow, it's even slower than Eclipse!
Please have a look at this video: http://youtu.be/utLQD5Gpg0M
Look & Feel:
GTK+ and Java Swing Applications do not play well at all together when it comes to look and feel. I am afraid we'd have to wait for Java 8 for a proper fix.
For the time being, if you're not using Kubuntu but Ubuntu and Unity, you have to switch to the native look and feel which is
Metal.
Go to your netbeans directory (ex:
/home/user/netbeans7.2/etc
) and open the file :netbeans.conf
then add the following line to netbeans options:
Source: http://hanynowsky.wordpress.com/2012/04/27/netbeans-ide-look-feel-under-ubuntu-12-04/
Global menus: Java Swing applications cannot benefit from Global menus integration for now. For the same reason: GTK/Swing implementations. Even Eclipse IDE is blacklisted for now even though it's SWT and not Swing based. Same goes for Emacs and Lotus notes. Nevertheless, you can activate Global Menu support for Java Swing applications by using Java Ayatana Library and for netbeans install the corresponding plugin : http://hanynowsky.wordpress.com/2012/05/12/integration-of-java-swing-applications-with-unity-global-menu-in-ubuntu-12-04/ By the way, it would be ideal if OpenJDK crowd include this same library in OpenJDK's next version so that Swing Application get support for Global Menu out of the box.
Slowliness: I use Netbeans IDE frequently on my machine and it's not slow at all compared to Eclipse. It might be an issue with the version packaged for Ubuntu Software Center (repos). I don't recommend it. Instead, download Netbeans 7.1.2 from Netbeans.org and install it locally on your home directory. You'll notice that it's faster than the version in repositories. Slowliness might also occur when you're using OpenJDK instead of Oracle JDK (Tested).
On Kubuntu 12.04 and I had to reinstall twice in order to get
netbeans
to load and run. I have experienced major degradation of performance. When I type, it takes seconds for to register.This is why I've switched to mac at home.
This seems to be a problem of the default Adwaita theme (and probably others as well). The gtkrc for GTK2 application causes problems to GTK LAF and prevents rendering separators and menu borders. Obviously, in some cases it may also cause UI sluggishness (even though I haven't experienced it)
By tweaking the gtkrc file I was able to resolve the problem.
================================================================================
Replace the following 3 style sections in the gtkrc :
I've just upgraded to Kubuntu 12.04 and there is no problem with NetBeans IDE what so ever. The reason my be that Kubuntu is KDE based distribution and NetBeans IDE is by default using Metal L&F.
In my opinion, you can improve your NetBeans experience under GTK by forcing it to use Metal L&F. The command line options is --laf Metal (or something like that).
Try using those switches in
netbeans.conf
You can give less memory to ReservedCodeCacheSize (default is 64m) but on my system with lots of RAM this switch made Netbeans suddenly much faster.
I had a problem with Netbeans ceasing to respond to keyboard and mouse input. Had to use xkill several times a day, losing work in the process. I upgraded to Netbeans 7.1 (not in the repositories, but a very simple upgrade) and have not experienced this issue since. I hope this helps someone with similar frustrations.
Put your
.netbeans
Homefolder into a Ramdisk as I mentioned here.It's been a long time since this question has been asked, but I do experience sluggish behaviour with Ubuntu 20.04.1 LTS and Netbeans 8.2.
I tracked down the problem to be a graphical one, as others suspected as well. I have not found a solution yet, but a workaround that works for my case : the UI gets unresponsive seldomly.
The workaround is to change the font size in Tools > Options > Fonts & Colors. Whatever you profile is, change the font size. I personnaly use 24, and set it to 26, then all is OK until the next restart. Then, change it back to 24. I allows me to use Darcula, by the way.