Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing IDEA on Ubuntu 11.10

I am trying to install IDEA on Ubuntu 11.10. First, I installed openjdk-7-jdk. Then I tried running the idea.sh file as instructed. However it complains:

ERROR: cannot start IntelliJ IDEA. No JDK found to run IDEA. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME  environment variable points to valid JDK installation.  Press Enter to continue. 

Trying to echo these three variables prints an empty line to the screen. How (and to what values) do I set these variables and proceed with the installation? Thanks.

like image 863
missingfaktor Avatar asked Dec 05 '11 08:12

missingfaktor


1 Answers

UPDATE:

It's recommended to use the bundled JetBrains Runtime on Linux to run IntelliJ IDEA. At the moment IntelliJ IDEA requires Java 8 to run on this platform. It's possible to switch to a system or some other Java version, please check the FAQ.


Original answer (obsolete):

It's recommended to use OpenJDK 1.7+ or Oracle JDK to run IntelliJ IDEA on Linux, OpenJDK 1.6 is strictly unsupported because of the known performance and visual issues.

Starting from IntelliJ IDEA 16, custom JRE is bundled with Linux distributions.

The tricky part is that Oracle JDK is no longer distributed via .deb packages and you can't just install it with apt-get or Ubuntu Software Center.

Their site is also confusing and you can easily download JRE instead of the JDK (which will not work as IntelliJ IDEA needs tools.jar that is missing from JRE package).

Here is the correct URL for the JDK downloads (version 1.6.0_29). From this URL download the appropriate .bin file, for example jdk-6u29-linux-i586.bin if you need 32-bit Java or jdk-6u29-linux-x64.bin for 64-bit version.

chmod +x jdk-6u29-linux-i586.bin ./jdk-6u29-linux-i586.bin 

to install in the current directory.

Inside bin/idea.sh add the following on the second line:

export IDEA_JDK=/path/to/jdk1.6.0_29 

Normally resides under /usr/lib/jvm/<YOUR_JDK>. Now IntelliJ IDEA should start fine under Oracle JDK 1.6.0_29. You can verify it in Help | About.

like image 130
CrazyCoder Avatar answered Sep 25 '22 23:09

CrazyCoder