Today I decided to give IntelliJ IDEA a go, venturing away from the Eclipse IDE and all of its horrors. I’ve heard good things about it, especially how smooth of an experience it is compared to Eclipse.
Being an Arch Linux user, installing IntelliJ was as simple as running pacaur to install the community edition:
pacaur -S intellij-idea-community-edition
This finished, and I proceeded to (naturally) start up the application. Oddities ensued, the loading splash dialog showing for a moment and then disappearing. I tried starting it through the console and found out that Java was encountering a segmentation fault in libGL. Strange.
On an even stranger side note, when I ran IntelliJ in the console using sudo, it started up like a charm. I don’t know why it worked in that case, and didn’t intend to find out, as I didn’t want to use sudo (or a terminal, for that matter) every time I wanted to open my IDE.
I was using OpenJDK6 at the time, so I figured it was probably something to do with that and proceeded to install Oracle’s JRE and JDK from the AUR:
pacaur -Rdd openjdk6
pacaur -S jdk jre
Oracle’s JDK installs, I try to open IntelliJ once more. No dice. I try running it via console once more and find that it is still segfaulting. I noticed that the
jre packages provide Oracle’s Java 7, and I immediately assumed it to be the culprit. For some (probably obvious) reason, Java 7 has caused many an issue these days, and most anything you try to do with it will probably be broken in some shape or form.
pacaur -Rdd jdk jre
pacaur -S jdk6 jre6
Now, this post is so short it probably doesn’t seem like it took very long for this issue to be resolved, but make no doubt about it. Finally, I saw the IntelliJ IDE open up in all its shiny glory.
One last tweak is needed, however. The packages installed by pacaur will install a script to /etc/profile.d/jre6.sh that sets the JAVA_HOME environment variable to point to the JRE location, in this case
/opt/java6/jre. This must be changed to point to the JDK location instead in order for IntelliJ to start without any additional issues. Open up the file and make it look like so:
Save and close, then log out and back in and try to start up IntelliJ once more, hopefully with success.
Oh, and you’ll probably note that the AUR has marked the jdk6 and jre6 packages as out of date. Go ahead and nevermind that, as they actually work as opposed to the supposedly “latest and greatest” packages.
Now I am off to actually give IntelliJ a try, particularly for its Android features. With any luck it will offer a tremendous improvement over Eclipse (probably not too difficult to accomplish, now that I think about it).