HOWTO create IntelliJ Idea Menu Item on Ubuntu Desktop

Creating a Menu Item for IntelliJ Idea (and I'm guessing any other Java GUI app) is pretty annoying on Ubuntu Desktop. As it turns out the annoyance is caused because your environment variables defined in .bashrc are not available when executing commands defined in the Menu Editor. To fix this you need to explicitly define the JDK_HOME variable before calling the idea.sh script.


The steps are;
Navigate to System > Preferences -> Main Menu
Locate "Programming" under the "Menus" panel
Click the "New Item" button
Enter the appropriate details;
Type
Application
Name
IntelliJ Idea
Command
bash -c "export JDK_HOME=/usr/lib/jvm/java-6-sun; ~/Development/Tools/Idea/current/bin/idea.sh"
Obviously you'll have to substitute the paths you are using for both Java and Idea...

No comments:

Post a Comment