Installing Intellij IDEA on Ubuntu 9.10
I’ve been a user of the excellent IntelliJ Java IDE for some time on Windows. Even though the official Linux support by JetBrains is only for RedHat, you can also install IntelliJ fairly easily on Ubuntu. I’ve tested this with ubuntu 9.10 , Java 6, and IntelliJ 8. Here’s how to do it in four basic steps:
UPDATE: I have set up Intellij idea community edition version 9.0.3 on Ubuntu 10.04.1 LTS following the exact same steps, and everything worked like a charm.
1) Get Java
Install the Java 6 JDK, which IDEA itself needs to run. (You can have other JDKs for your projects, but you’ll need this one to run IntelliJ itself.) For example, type this in a terminal:
sudo apt-get install sun-java6-jdk
Follow the prompts for root password, download confirmation, and eventually the Sun EULA to install Java itself. If it installed successfully, you should be able to type this at a prompt:
java -version
… to get several lines telling you the version of Java you have installed. If this doesn’t work, refer to Sun’s documentation on troubleshooting installations.
2) Get IntelliJ IDEA
Download the latest version of IntelliJ IDEA for Linux:
http://www.jetbrains.com/idea/download/index.html#linux
Once the download is finished, extract the archive using the correct filename according to your download. For example, to install IntelliJ in /usr/lib, do the following:
tar xfz idea-7.0.1.tar.gz ./usr/lib/
The IntelliJ installation will now be in a subdirectory indicating the build number, in the format “idea-xxxx”. In the case of IDEA 8.0.1, the app directory is “idea-9952“. (Once the extraction is done, you can delete the downloaded archive to conserve disk space if needed.)
3) Get Environmental
There are a couple of environment variables to be taken care of. First, you need to set a new environment variable that tells IntelliJ where your install of Java is. For example:
export JDK_HOME="/usr/lib/jvm/java-6-sun/"
Use the “env” command, or just “echo $JDK_HOME“, to verify the variable is set.
Next, you’ll need to edit /etc/environment with superuser rights in the editor of your choice, adding the idea-xxxx/bin directory to your PATH variable. For example, you can edit the environment with the GUI mousepad editor like so:
sudo mousepad /etc/environment
The various directories in the environment PATH variable are delineated by colons (:). Append the current value (inside the quotes) with a new colon and then add the idea-xxxx/bin location. It should look something like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/lib/idea-7364/bin"
Save and close the environment file. You’ll need to “source” it for your system to pick up the new directory in the PATH. You can verify your changes by echoing the variable as well:
source /etc/environment
echo $PATH
If you see the path to IntelliJ returned in the output, you’re all set.
Lastly, you may want to change the VM settings of IntelliJ. This depends entirely on your project size and other factors, so you’ll need to base these settings on your own need. The settings are in idea-xxx/bin/idea.vmoptions.
4) Get Started!
That’s it. Now you can run “idea.sh” from a terminal in any directory, and IntelliJ should launch…
idea.sh
If you run into problems, be sure to double-check the readme files in the installation directory.
NB. Running idea.sh will allow idea to run as long as the command window is on, if you close the terminal, idea wil close too. To make idea run in background, you have to run
idea.sh&
Give Back
If this article proved useful to you, please drop us a comment and let us know. Or, if you find problems/alternate solutions along the way, please share them for the benefit of others. Thanks and happy coding!
I’ve been a user of the excellent IntelliJ Java IDE for 4 years on Windows. Even though the official Linux support by JetBrains is only for RedHat, you can also install IntelliJ fairly easily on Ubuntu. I’ve tested this with Xubunto 7.10 (Gutsy), Java 6, and IntelliJ 7.
Andy Whitten(Quote)
Hello,
I tried this and it work in few minutes
Wonderful good quick article
Regards,
Noel
NOEL ALEX MAKUMULI(Quote)
Multiuniverse package URL has been changed refer here for some more information.
https://wiki.ubuntu.com/LucidLynx/ReleaseNotes#Su…
Regards
Noel
Noel Alex Makumuli(Quote)
Thanks for the helpful article. After getting it working, I found a way to simplify the environment customization (step 3) on my 10.04LTS system. I simply created /etc/profile.d/idea.sh with the following contents:
PATH="$PATH:/usr/lib/idea-IC-95.429/bin"
export JDK_HOME="/usr/lib/jvm/java-6-sun"
This puts all of the relevant environment changes in one file. The file is automatically picked up system-wide.
I hope that helps!
Eric(Quote)
Eric, thanks for your input, I will try your method too, as you know sharing is caring. (education wise!)
phesto(Quote)
Thanks it worked for me.
Gaurav(Quote)
Thanks for the page, it was very helpful. Eric, I like your idea, thanks. I had to remove the quotes around the value of JDK_HOME:
export JDK_HOME=/usr/lib/jvm/java-6-sun
dovev(Quote)
Also, if you only want to use sun java for this program (and open sdk that comes with ubuntu for other things), you can set IDEA_JDK instead of JDK_HOME. This is true for version 10.0, I don't know about earlier versions.
dovev(Quote)
dovev, thanks for the input, nice to know that.
Regards.
admin(Quote)