DataDriven Framework- Unable to run test cases using ant | Selenium Forum
D
dipu.sandeep Posted on 16/01/2020

I am getting below error

 

ant run

Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.
0_131\lib\tools.jar
Buildfile: C:\Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Zoho_Dec2
019\build.xml

setClassPath:

init:

clean:
[delete] Deleting directory C:\Users\Praveen\eclipse-workspace\Learning-java\
DataDriven_Zoho_Dec2019\build

compile:
[echo] making directory...
[mkdir] Created dir: C:\Users\Praveen\eclipse-workspace\Learning-java\DataDr
iven_Zoho_Dec2019\build
[echo] classpath------: C:\Users\Praveen\eclipse-workspace\Learning-java\Da
taDriven_Zoho_Dec2019\jars\SaxonLiaison.jar:C:\Users\Praveen\eclipse-workspace\L
earning-java\DataDriven_Zoho_Dec2019\jars\dom4j-1.1.jar:C:\Users\Praveen\eclipse
-workspace\Learning-java\DataDriven_Zoho_Dec2019\jars\extentreports-2.41.2.jar:C
:\Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Zoho_Dec2019\jars\fre
emarker-2.3.23.jar:C:\Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Z
oho_Dec2019\jars\jsoup-1.8.3.jar:C:\Users\Praveen\eclipse-workspace\Learning-jav
a\DataDriven_Zoho_Dec2019\jars\poi-3.6-20091214.jar:C:\Users\Praveen\eclipse-wor
kspace\Learning-java\DataDriven_Zoho_Dec2019\jars\poi-ooxml-3.6-20091214.jar:C:\
Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Zoho_Dec2019\jars\poi-o
oxml-schemas-3.6-20091214.jar:C:\Users\Praveen\eclipse-workspace\Learning-java\D
ataDriven_Zoho_Dec2019\jars\saxon-8.7.jar:C:\Users\Praveen\eclipse-workspace\Lea
rning-java\DataDriven_Zoho_Dec2019\jars\selenium-server-standalone-2.52.0.jar:C:
\Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Zoho_Dec2019\jars\sqli
te-jdbc-3.8.11.1.jar:C:\Users\Praveen\eclipse-workspace\Learning-java\DataDriven
_Zoho_Dec2019\jars\testng-6.8.5.jar:C:\Users\Praveen\eclipse-workspace\Learning-
java\DataDriven_Zoho_Dec2019\jars\xmlbeans-2.3.0.jar
[echo] compiling...

BUILD FAILED
C:\Users\Praveen\eclipse-workspace\Learning-java\DataDriven_Zoho_Dec2019\build.x
ml:79: 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 "C:\Program Files\Java\jre1.8.0_131"

Total time: 0 seconds


A
Ashish Thakur Replied on 17/01/2020

Please make sure that you are using and configured JDK 8 only. JRE won't work.


D
dipu.sandeep Replied on 19/01/2020

I did change that. but still no luck. Please suggest what all paces I need to make change?

 


A
Ashish Thakur Replied on 23/01/2020

Please make sure that you have set environment variables with a path to JDK.

 

JAVA_HOME : jdk path only

Path : Bin path inside JDK (Add this line, do not replace anything)


D
dipu.sandeep Replied on 12/04/2020

I was having jre path was well in my Path varuable. I have removed and ran it again and it worked. You can close this.


A
Ashish Thakur Replied on 14/04/2020

Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.
0_131\lib\tools.jar

 

place tools .jar in there

its present in JDK


D
dipu.sandeep Replied on 23/04/2020

I figured out. Please close this.


Related Posts