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

本文解决了在 Eclipse 中运行 ant 脚本时出现的 SocketTimeoutException 异常问题,原因是安装新插件导致 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.

1 !ENTRYorg.eclipse.ant.ui41202010-08-3111:39:33.125
2 !MESSAGEErrorloggedfromAntUI:
3 !STACK0
4 java.net.SocketTimeoutException:Accepttimedout
5 atjava.net.PlainSocketImpl.socketAccept(NativeMethod)
6 atjava.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
7 atjava.net.ServerSocket.implAccept(ServerSocket.java:453)
8 atjava.net.ServerSocket.accept(ServerSocket.java:421)
9 atorg.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
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值