aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Building with ant from eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Building with ant from eclipse" Watch "Building with ant from eclipse" New topic
Author

Building with ant from eclipse

sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
I have the following in the build.xml


I am running it from eclipse and I am getting a java.io.IOException: Cannot run program "wsgen": CreateProcess error=2, The system cannot find the file specified.
It looks like wsgen cannot be found. Anyone seen this before. windows->preferences->tasks
shows that wsgen is there

Thanks in advance.
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Sonia:

You probably need to tell Ant what the path to wsgen is.

John.
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
I set the path to point to the ant libraries. But from Eclipse? Eclipse already knows about Ant. So why is it having a problem?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38851
    
  23
Better discussed in the IDEs forum. Moving.
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Sonia:

What I meant was, does Ant know where to find the wsgen executable file? Given the error you're getting, it looks like it can't. Have you tried running ant from the command line?

John.
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
I tried but I get an error because it cant find Ant, But i did add it to the path. So I don't know what the problem is.
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Sonia:

Have you tried using the absolute path?

John.
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137
you mean in the build.xml. Could you post what the build.xml should look like?

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

No; we don't know where your wsgen program is located.
sonia pandit
Ranch Hand

Joined: Apr 19, 2008
Posts: 137


Do you mean like this?">
John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Sonia:

Yes, or create a path element (which will work out to the same thing).

John.
Seguya Ronald Chris
Greenhorn

Joined: Dec 16, 2011
Posts: 1
There's a posibility that you don't have the wsgen within your eclipse installation.
You could try searching for that term in you java directory, usually under a path like; C:\Program Files\Java\jdk1.6.0\bi\wsgen

Use this path for the exec i.e. <exec executable="D:\Program Files\Java\jdk1.6.0\bin\wsgen">

I had a similar issue but this solved my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building with ant from eclipse