Category Archives: IDE

Adding custom Intellij Idea launcher on unity (Ubuntu 12.04)

As you know Intellij Idea comes in tar.gz distribution for linux OS, so it is only possible to launch it from terminal after unpacking.

But there is a possibility to add quick launcher button for unity.
First of all, create idea.desktop file with the following contents:

[Desktop Entry]
Name=Idea Community Edition
Comment=Launch Idea Community Edition

Paste your location to the Idea distribution in the italicized text given above.
After that, open this file in nautilus and just drag it to your launcher bar.

Tuning Intellij Idea

First of all consider changing idea.vmoptions.
idea.vmoptions is a text file with a list of JVM settings, it’s usually found in the bin folder in the Idea installation folder. This file can be open in any text editor.

The following settings increase performance drastically on Sun JVM 1.6:


Notice, that I enabled concurrent mark-sweep GC (in theory it’d be faster than others on 1.6) and aggressive optimizations as well as server JVM and I don’t use assertions (no `-ea’ switch).

I tested these on x86 linux with Idea Community edition of build 111.69

As for appearance I’d suggest using Nimbus theme (Settings -> Appearance -> Look and Feel).

That’s how idea looks on my Ubuntu:

Idea 11 Community Edition on Ubuntu

Full screenshot is available here.

P.S.: For Mac OS X users:
There is no idea.vmoptions file on Mac OS X.
In order to modify the mentioned JVM settings, you’d go to the application’s package contents, then open the inner “Contents” folder and then open Info.plist (just click on it and the standard plist editor will be opened). In the opened plist editor consider changing Java > VMOptions key as given above.
You may copy-and-paste the following value I use on my Mac laptop:

-Xverify:none -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -XX:+CMSClassUnloadingEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:-TraceClassUnloading -Xbootclasspath/a:../lib/boot.jar

Note, that you may want to make Idea start in 32-bit mode to reduce the memory consumption and increase the overall IDE performance. Just ctrl-click on the application icon in the “Applications” folder and click on the checkbox “Open in 32-bit mode”.

After doing so Idea starts in 1 (ONE) second or so on my Mac Book Pro!

You have to edit idea64.vmoptions if you’re running idea in 64-bit mode (thanks to Rudy for noticing this).

Ugly Netbeans font rendering on Ubuntu Linux

Netbeans fonts rendering may look ugly on the latest Ubuntu.
The following configuration does the trick for me (file $netbeans/etc/netbeans.conf, see part in bold):

# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options=”-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd_hrgb

Checked with openjdk, it probably won’t work for “older” sun JDK.