Java – sockettimeoutexception when building ant in eclipse

I had problems building some of my ant scripts using eclipse (some built normally, others didn't) Basically, I'm at eclipse Mars 1 there is no output in the release (4.5.1) console When I run it on the command line, my build XML works properly I can work in workspace / Metadata / . Log, where I found the following error message:

!ENTRY org.eclipse.ant.launching 4 120 2016-03-03 09:58:38.197
!MESSAGE Error logged from Ant UI: 
!STACK 0
java.net.socketTimeoutException: Accept timed out
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
    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)

Others asked about stackoverflow

Another strange thing I noticed is that there is a line of text right above the console showing which java version is being used, and working scripts are different from non working scripts Using jdk1 7.0_ 79 working ant build script, and failed to use / system installation 1.6

Solution

I don't know why Java 1.6 can't work for me, but I finally found a place where I can change Java for ant build It is located in run / external tools / external tool configuration... / < select failed build > / JRE Strangely, after making it work and trying to switch back to 1.6, it gives the following message when running ant:

JRE version less than 1.7 is not supported.

So who knows why 1.6 was selected first (maybe the project itself is 1.6) or why it didn't give me a warning!

Anyway, there seem to be several reasons for the error I posted above, but you can try here

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>