Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Execute failed: java.io.IOException - error 2

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I tried run an ant in my J2ME project, but i found this error:
BUILD FAILED: C:\des\crazy\java\build.xml:40: Execute failed: java.io.IOException: CreateProcess: preverify.exe -classpath C:\WTK21\lib\midpapi20.jar -d C:\des\crazy\java\bin\build\preverified C:\des\crazy\java\bin error=2

I am trying preverifies the code, but i don�t know what�s happen.

my target is:
<target name="preverify_SUN"
description="Previrifies">
<mkdir dir="${project.build.preverified}"/>
<exec dir="${SUN.bin.path}" (C:\WTK21\bin)
executable="preverify.exe">
<arg line="-classpath ${SUN.midp20.path}"/> (C:\WTK21\lib\midpapi20.jar)
<arg line="-d ${project.build.preverified}"/>
<arg line="${project.classes.dir}"/>
</exec>
</target>

I verified the CLASSPATH, PATH, JAVA_HOME and others things, but I don�t find the error.

I am using the Eclipse to run and to edit the Ant.

Someone can help me?
[ November 24, 2004: Message edited by: Afonso Alcantara ]
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have just had this same problem. You have to ensure the folder where this executable lives is included in your build path. You also need to explicitly define where the executable lives in your build file if it still doesn't work.

For instance my problem:
C:\workspace\WayneGrant\build.exe.xml:19: Execute failed:
java.io.IOException: CreateProcess: makensis.exe error=2

From this line:
<exec executable="makensis.exe"/>


Was fixed by:
<project name="NSIS" default="build" basedir="." >

<target name="build" >

<property name="nsis.dir" value="c:/program files/nsis" />

<exec executable="${nsis.dir}/makensis.exe"/>

</target>

</project>



Although as you reported this problem a while ago you probably don't need this solution any more! lol

Gem
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had the problem before, I remember I needed to reinstall wtk somehow to make it work properly...

Also, I used antenna from sourceforge
 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cameron

i too got the same error and fixed the erro by solution given by you.

<property name="nsis.dir" value="c:/program files/nsis" />
<exec executable="${nsis.dir}/makensis.exe"/>

if we need to give the full absolute path in the executable dir itself then what for the attribute dir exist for the task <exec>.

It will be more logical if we provide the dir as the path where exe file resides and executable will hold the exact file name..

i.e

<exec executable="makensis.exe" dir="c:/program files/nsis"/>

but the above script wont work? why???

Any one who knows please clarify me.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have post to solve this problem in my blog.

http://binodjava.blogspot.com/2009/05/how-to-use-runtimegetruntimeexec-how-to.html

Thanks,

Binod Suman
http://binodsuman.blogspot.com
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

Please DontWakeTheZombies, they bite!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic