Vishnu
Vishnu

Reputation: 41

Unable to run ANT target in eclipse getting terminated at beginning and pointing to jdk\bin\javaw.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

Upvotes: 4

Views: 8772

Answers (2)

JRA_TLL
JRA_TLL

Reputation: 1361

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.

Upvotes: 2

Jeshurun
Jeshurun

Reputation: 23186

This usually happens if:

  1. You changed the location of eclipse
  2. You changed the location of your jdk / jre
  3. Both

  1. 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.

  2. 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.

Upvotes: 9

Related Questions