Ant Plugin: java.net.SocketTimeoutException: Accept timed out Solution

本文介绍了一种常见的情况:在Eclipse中运行Ant脚本时出现异常,表现为Ant脚本似乎未被执行,并给出了具体的错误日志。通过分析发现,这通常是因为安装了新的插件导致Ant home路径设置被更改。文章最后提供了详细的解决方案,指导用户如何重新定义正确的Ant Home路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Issue:

When you are running build.xml ant script in Eclipse, you may find it doesn’t work. It seems like ant script is not running at all. And you can find following exception from your workspace/.metadata.

!ENTRY org.eclipse.ant.ui 4 120 2010-08-31 11:39:33.125
!MESSAGE Error logged from Ant UI: 
!STACK 0
java.net.SocketTimeoutException: Accept timed out
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
    at java.net.ServerSocket.implAccept(ServerSocket.java:453)
    at java.net.ServerSocket.accept(ServerSocket.java:421)
    at org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:95)

Reason:

The reason is that may be you installed a new plugin (e.g. Axis2_service_Archiver_1.3.0) to your eclipse. But this plugin changed your ant_home path setting. So, eclipse cannot find correct ant.bat to execute ant script.

Solution:

  1. From Eclipse ->window->preferences->Ant->Runtime->Classpath,click “Ant home”
  2. redefine Ant Home path.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yexianyi

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值