How to Get IntelliJ IDEA Working Under Arch Linux

  • 0
  •  Add a Comment

Friday, February 24th, 2012
at 12:42am


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 jdk and 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.

Returning to the console, I removed the Oracle packages and installed the jdk6/jre6 pair instead:

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:

export PATH=$PATH:/opt/java6/bin:/opt/java6/jre/bin
export JAVA_HOME=${JAVA_HOME:-/opt/java6}

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. spacer

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).

Tags
  • Guide
  • How-to
  • ide
  • intellij
  • Linux
Categories
  • How-to

Leave a Comment

 

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.