日食:改变运行Ant主导致错误弹出关于失踪的tools.jar库 [英] Eclipse: changing runtime Ant Home results in error popup regarding missing tools.jar library

查看:404
本文介绍了日食:改变运行Ant主导致错误弹出关于失踪的tools.jar库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从内置的Eclipse到我的计算机(Windows XP专业版)上的其他地方保存的更强大和最新版本的过时的版本改变我的Eclipse IDE(太阳神)的运行蚂蚁版本。为了做到这一点变化,我不得不去为窗口 - > preferences - >蚂蚁 - >运行 - >类路径,然后改变的蚂蚁首页应用于较新版本的Ant主目录。这将导致以下是 - 否弹出消息:

<块引用>指定的蚂蚁运行时类路径不包括的tools.jar库。这可能会影响到使用各种任务的能力。忽视这个可能出现的问题?

即使回复到原来的内置目录的 Ant主的在同一弹出警告消息的结果。此外,我的Ant build.xml脚本运行,尽管该警告只是确定。

我知道有这种状态涵盖了类似的问题,其他一些SOF问题:Ant构建脚本执行过程中的错误消息,因为tools.jar中丢失。这些问题似乎涉及到一个JAVA_HOME变量的问题(<一个href=\"http://stackoverflow.com/questions/2618281/ant-error-when-trying-to-build-file-cant-find-tools-jar\">relevant问题)。难道这是Eclipse中试图提醒我一下?或将不同的东西这样的警告?我相信我有ANT_HOME和JAVA_HOME变量正确设置我的电脑上。


解决方案

警告指根据窗口的Java设置> preferences>的Java>已安装的JRE指向JRE而不是JDK。结果
您所有的蚂蚁的东西将正常工作与需要tool.jar 结果javac任务除外
无论是使用:结果
窗口> preferences>蚂蚁>运行>类路径和JDK安装结果添加的tools.jar
或结果
从JRE更改在Window> preferences> Java中的设置>已安装的JRE为JDK结果
使tool.jar进入游戏。

I was trying to change the runtime Ant version of my Eclipse IDE (Helios) from the outdated version built-in with Eclipse to the more robust and latest version saved elsewhere on my computer (Windows XP Professional). In order to do this change, I had to go to Window -> Preferences -> Ant -> Runtime -> Classpath and then change the Ant Home to the home directory of the newer Ant version. This results in the following yes-no popup message:

The specified Ant runtime classpath does not include a tools.jar library. This may affect the ability to use various tasks. Ignore this possible problem?

Even reverting back to the original built-in directory for Ant Home results in the same popup warning message. In addition, my Ant build.xml script runs just ok despite this warning.

I know there are some other SOF questions that state covers a similar problem: an error message during an Ant build script execution because tools.jar is missing. These questions seems to relate to a JAVA_HOME variable problem (relevant question). Is this what Eclipse was trying to warn me about? Or is this warning about something different? I believe I have ANT_HOME and JAVA_HOME variables set up properly on my computer.

解决方案

The warning means your Java Setting under Window > Preferences > Java > Installed JREs points to JRE instead of JDK.
All your ant stuff will work fine with the exception of the javac task which needs the tool.jar
Either use :
Window > Preferences > Ant > Runtime > Classpath and add the tools.jar from your JDK installation
or
change the settings under Window > Preferences > Java > Installed JREs from JRE to JDK
to bring the tool.jar into the game.

这篇关于日食:改变运行Ant主导致错误弹出关于失踪的tools.jar库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆