permaculture playing cards*
The moose likes Web Services and the fly likes  java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark " java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor)" Watch " java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor)" New topic
Author

java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor)

Krish mys
Greenhorn

Joined: Jan 05, 2010
Posts: 7
Hi,
I am new to webservices.
i am running one sample standalone program from developerworks IBM.

here is the build.mxl file that i am using

project default="wsgen">

<target name="wsgen" >

<exec executable="wsgen">

<arg line="-cp ./bin -keep -s ./src -d ./bin com.myfirst.wsServer.SayHello"/>

</exec>

</target>

</project>


While running this file , i am getting error like
Cannot run program "wsgen": CreateProcess error=2, The system cannot find the file specified

And if i change the <exec executable="to the path where i am creating build.xml file">

i am getting error like

java.io.IOException: Cannot run program ----CreateProcess error=5, Access is denied...

Please help me out in this...
Thankx in advance
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you tried using the wsgen command that is included in the Java SE 6 JDK?
Here is an ant-script that does just that. You have to modify the places indicated by MODIFY HERE.

Best wishes!
Krish mys
Greenhorn

Joined: Jan 05, 2010
Posts: 7
Hi Ivan,

Thanks for your post.

but, still i am getting the same error.

now i changed the "exec" of build.xml file like this

<project default="wsgen">

<target name="wsgen" >

<exec executable="C:\jdk-1.6\bin">


<arg line="-cp ./bin -keep -s ./src -d ./bin com.myfirst.wsServer.SayHello"/>

</exec>

</target>

</project>


after executing this i am getting "Execute failed: java.io.IOException: Cannot run program "C:\jdk-1.6\bin": CreateProcess error=5, Access is denied".

Krish mys
Greenhorn

Joined: Jan 05, 2010
Posts: 7
Thanks its working fine now...
i need to give C:\jdk-1.6\bin\wsgen as the path for executable.
 
 
subject: java.io.IOException:CreateProcess error=5, Access is denied(While running build.xml in Ant editor)
 
Similar Threads
Building with ant from eclipse
Using exec task
Using DOS commands in Java
Cannot run program. CreateProcess error=740, The requested operation requires elevation
How to print classpath using ant