30 January 2010

Creating an IntelliJ launcher on Ubuntu 9.10

Over the last couple of months I've slowly switched from Eclipse to IntelliJ 9 as my main IDE for Java development. After having used Eclipse for more then 5 years I got pointed to IntelliJ by friends from JTEAM, that I'm working with at one of my projects. They challenged me to start using IntelliJ, because I would eventually be impressed and would never want to switch back.

As I'm working on my Dell/Linux laptop, I used to start IntelliJ from the command line as instructed in the readme. Starting it from the command line started bugging me after a while, so I wanted to create a launcher for it. Creating a launcher seemed quite simple at first, but getting it to work was something else.

After a while I figured it out that by using the following line in my application launcher:


/bin/sh -c "export JDK_HOME=/path/to/java&&/path/to/intellij/bin/idea.sh"


I was able to get my IntelliJ launcher to work. As you might notice, you will still have to change the path to your JDK_HOME and IntelliJ installation directory, because they might be different on your own system.
I hope this post can help all of you out there trying to do the same thing.

11 reacties:

  1. Thank you very much for the post.
    ReplyDelete
  2. It helped - thank you.
    ReplyDelete
  3. Thank you VERY much. What a pain it's been to get this launcher working! Idea is awesome, I'm glad to have found a easier way to launch it every day.
    ReplyDelete
  4. Thank you ! It works for RubyMine as well, as one would expect.
    ReplyDelete
  5. You can also use bash -l to get your environment variables as if you had logged into a terminal:

    bash -l path/to/rubymine/bin/rubmine.sh

    Works for me and takes away that dependency on the JDK_HOME.
    ReplyDelete
  6. Hi, how you doing? :)
    Alternatively, expose java on your path for the gnome session: http://robvdlindenvooren.wordpress.com/2010/02/28/ubuntu-karmic-koala-notes-to-self/
    ReplyDelete
  7. Hi, I created a custom application launcher and gave the input for the command option in launcher properties as: /bin/sh -c "export JDK_HOME=/home/hasini/Setupfiles/jdk1.6.0_21&&/home/hasini/Software/idea-IC-93.94/bin/idea.sh"

    But the launcher doesn't launch IDEA or doesn't even give any error.

    Any help would be really appriciated.
    Thanks,
    Hasini.
    ReplyDelete
  8. THANKS!!!!!!!!!!
    ReplyDelete