build.xml expects tools.jar at a different location

天涯浪子 提交于 2019-12-11 03:55:01

问题


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



来源:https://stackoverflow.com/questions/9527271/build-xml-expects-tools-jar-at-a-different-location

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!