Thursday, May 29, 2014
'tools.jar' seems to be not in IDEA classpath. Please ensure JAVA_HOME points to JDK
Here are what I did then:
1. Know what exactly the problem is: the problem is that the JAVA_HOME in my system did not point to JDK. Instead, it points to a JRE. JRE can only be used to run java applications, not to build them.
2. Check the java path used by the system. In terminal, I typed the following
$ java -version
The output was
$ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode
Find out more
$ update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode
1 /usr/lib/jdk1.6.0_45/bin/java 1 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
As I see in lot of posts, I have to use java-7-openjdk.
But I changed it JDK path So I have to change the selection into 2. OK... now type 2 and enter.
That's only you are ready to go now....
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment