Setup and install IntelliJ with JDK
Installing JDK
To install JDK, you can refer to help.ubuntu.com/community/Java.
If you want to install openJDK,
sudo apt-get install openjdk-7-jdk
If you want to install Oracle JDK, you can use PPA from webup8 team.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Installing IntelliJ IDEA
[Updated Answer]
Download IntelliJ IDEA CE from www.jetbrains.com/idea/download/.
Extract ideaIC-XX.Y.Z.tar.gz using
tar -zxvf ideaIC-XX.Y.Z.tar.gz
Run
idea.sh
inbin
directory inside the extracted folder.- To create command-line runner,
Tools > Create Command-line Launcher
- To create a desktop entry,
Tools > Create Desktop Entry
That's it. Now, you can launch IntelliJ from Ubuntu dash.
[Old Answer]
Download IntelliJ IDEA CE from www.jetbrains.com/idea/download/.
Extract ideaIC-XX.Y.Z.tar.gz using
tar -zxvf ideaIC-XX.Y.Z.tar.gz
Become root.
sudo -i
Move the extracted folder to
/opt/idea
mv ideaIC-XX.Y.Z /opt/idea
Create a desktop file and install it:
gedit idea.desktop
and copy the following to the
idea.desktop
file.[Desktop Entry] Name=IntelliJ IDEA Type=Application Exec=idea.sh Terminal=false Icon=idea Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=IntelliJ IDEA
then execute the following command to automatically install it in the unity:
desktop-file-install idea.desktop
Create a symlink in
/usr/local/bin
usingcd /usr/local/bin ln -s /opt/idea/bin/idea.sh
For idea icon to be displayed in dash, idea icon can be added as
cp /opt/idea/bin/idea.png /usr/share/pixmaps/idea.png
That's it. Now, you can launch IntelliJ from Ubuntu dash.
This should get you started:
#!/bin/sh
add-apt-repository ppa:webupd8team/java &&
apt-get update &&
apt-get install oracle-java7-installer &&
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections &&
update-java-alternatives -s java-7-oracle &&
wget -O /tmp/intellij.tar.gz http://download.jetbrains.com/idea/ideaIC-12.0.4.tar.gz &&
tar xfz /tmp/intellij.tar.gz &&
cd idea-IC-123.169/bin &&
./idea.sh
Some things you should consider:
- I'm not sure at which part the
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
has to be. Might be a line earlier. - The line
cd idea-IC-123.169/bin
is dependend on the IntelliJ version, as the extracted folder is named in that way. It only works with the version available while I'm writing this. - Same goes for the download link. It might change with a newer version.
- I'm not sure what happens if you try to add a ppa that already exists again. This could lead to problems.
- You have to execute the script as root
New way: you can use Ubuntu Make. To install on 16.04 (Xenial) [and later]
sudo apt install ubuntu-make
If your Ubuntu version if before 16.04 (codename Xenial), you can install from the Ubuntu Make PPA. First, add the PPA to your system:
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make sudo apt-get update
Then, installing Ubuntu Make:
sudo apt-get install ubuntu-make
After installing Ubuntu Make, do a
umake ide idea