3

Hello I am on Linux Mint 16 KDE 64.

I have OpenJDK 7 installed and Oracle JDK 7 and if I run Intellij as a normal user I get:

'tools.jar' seems to be not in IDEA classpath. Please ensure JAVA_HOME points to JDK rather than JRE

Also if I run gradle build on any of our projects as a normal user I get:

Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.

If I run

echo $JAVA_HOME

Then I get:

/usr/lib/jvm/default-java

I get the same thing if I run it with sudo.

As per the comments below javac -version produces:

javac 1.7.0_51

Same result with sudo.

What am I doing wrong?

3

You installed only JRE. Try to install JDK:

sudo apt-get install openjdk-7-jdk

  • Wow that actually worked. I guess I just didn't have everything setup properly when I installed the oracle jdk. Thank you. – twreid Mar 19 '14 at 13:44
1

try to run javac -version to get version of your java compiler.

You should get answer like javac 1.7.0_something.

if it's not available then you have only Java Runtime Environment (jre), not Java Development Kit (jdk) installed and you should install the openjdk-7-jdk as Anton suggested.

  • I have updated my question with the results of javac -version – twreid Mar 19 '14 at 13:43
  • Thank you. If it was run after installing openjdk-7-jdk then it makes sense, if it was before installing openjdk-7-jdk then it's weird. – andrej Mar 19 '14 at 15:17
  • Yea that output was before I ran the sudo apt-get install openjdk-7-jdk command. – twreid Mar 19 '14 at 16:14
  • Then I don't understand it. The intellij and gradle complain about nonexisting JDK, the javac is part of JDK but not part of JRE and it still displays javac version even without JDK installed. – andrej Mar 19 '14 at 17:49
  • Yea I didn't have any idea either. I tried everything I could think of before asking. – twreid Mar 19 '14 at 18:06

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.