build.xml expects tools.jar at a different locatio

2019-07-14 13:04发布

问题:

While using Ant to build my application, the build is successful but at the beginning it says

Unable to locate tools.jar. Expected to find it in D:\Java\jre6\lib\tools.jar

However my tools.jar is at the location D:\Java\jdk6u30\lib

I understand that tools.jar contains classes needed by jdk and should only be present at jdk lib and nowhere else. I hope I am correct on this. My question is that why does build.xml expects it at a different location? I have my JAVA_HOME set to

D:\Java\jdk6u30

.

回答1:

So by default eclipse will take the jre as installed JRE's when you add the server. Change the installed JRE's to jdk.

You can locate it from Window->Preferences->Java->installed JRE's



标签: ant java