无法在 Eclipse 中运行 ANT 目标,在开始时终止并指向 jdk\bin\javaw.exe
我无法在 Eclipse 环境中运行 ant 目标。当我双击 ant 目标时,它直接终止,控制台窗口中不显示任何内容。我可以在控制台窗口顶部看到一条消息: “ ProjectName build.xml [ant target] [Ant Build] C:\Programfiles\Java\jdk1.6.0_20\bin\jawa.exe ”并且控制台窗口中没有显示任何内容。任何人都可以帮助我吗?
提前致谢 毗湿奴
I'm unable to run the ant target in eclipse environment. when i double click on the ant target, it terminating directly and nothing is shown in the console window. and I can see a message at the top of console window as
" ProjectName build.xml [ant target] [Ant Build] C:\Programfiles\Java\jdk1.6.0_20\bin\jawa.exe " and nothing is showing in the console window. Can anyone help me please.
Thanks in Advance
Vishnu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
则通常会发生这种情况
如果您更改了 eclipse 的位置,请转至 Window ->;首选项->蚂蚁->运行时。在类路径选项卡下,确保 ant home 条目正确。如果没有,请仔细找到它们所在的文件夹(它们都位于 eclipse 插件文件夹下的同一文件夹中)并重新添加它们,然后删除无效条目。
如果您更改了 jre/jdk 的位置:
a) 转到窗口 ->首选项->蚂蚁->运行时,在类路径选项卡下,展开全局条目树。确保tools.jar 的位置有效并且位于文件系统中指定的位置。
b) 单击运行 ->外部工具 ->外部工具配置。展开 Ant Build,选择工作区中的每个 ant 构建文件,然后展开 jre 选项卡并确保选中“在与工作区相同的 JRE 中运行”,或者单独的 JRE 指向有效的已安装 JRE。
This usually happens if:
If you changed the location of eclipse, go to Window -> Preferences -> Ant -> Runtime. Under the classpath tab, make sure the ant home entries are correct. If not, carefully locate the folder they are in (they are all in the same folder which is under the eclipse plugins folder) and add them again, then delete the invalid entries.
If you changed the location of your jre / jdk:
a) Go to Window -> Preferences -> Ant -> Runtime, and under the classpath tab, expand the Global Entries tree. Make sure the location of tools.jar is valid and is located where it says it is in the file system.
b) Click on Run -> External Tools -> External Tools Configuration. Expand Ant Build, select each of your ant build files in the workspace, then expand the jre tab and make sure that you either have "Run in the same JRE as the workspace" checked, or your Separate JRE points to a valid installed JRE.
查看 Eclipse 错误日志。我最近在那里看到以下错误:
Errorlogging from Ant UI:
java.net.SocketTimeoutException: Accept timed out
在 java.net.DualStackPlainSocketImpl.waitForNewConnection(本机方法)
在 java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
在 java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
在 java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
在 java.net.ServerSocket.implAccept(ServerSocket.java:545)
在 java.net.ServerSocket.accept(ServerSocket.java:513)
在 org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:89)
Windows 重新启动解决了该问题。
Have a look at the Eclipse error log. I recently saw following error there:
Error logged from Ant UI:
java.net.SocketTimeoutException: Accept timed out
at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:89)
A Windows reboot solved the problem.