الأحد، 3 مايو 2015

Ant : JAVA_HOME does not point to the JDK [solved]

Solution for problem : 

BUILD FAILED /home/bilal/tmp/ant/build.xml:19: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "/usr/lib/jvm/java-6-openjdk/jre"

Description:


this problem appeared to me when I was trying to apply this tutorial :
http://nowdrifting.com/building-hadoop-source-using-svn-ant/
 to build hadoop source code using ant
 the problem appears in step 10


Solution: 

for eclipse using ubuntu:
go to Window->Preferences->Ant->Runtime->Select Ant_Home_Entries and click on add external jars then find in file explorer where your jdk is (default is in /usr/lib/jvm/) and in the lib folder of your jdk you will find the tool.jar. select this one and click apply.
try to build your project and things should work!

         if this solution doesn't work trysetup openjdk-7 by this command:
                sudo apt-get install openjdk-7-jdk




this solution works very good for me.

the solution from this link :
http://stackoverflow.com/questions/11245865/java-home-does-not-point-to-the-jdk
 thanks so much dtrihinas for your solution

0 التعليقات:

إرسال تعليق