ant build failed xxx\xxx\build.xml:49: Java returned: -1

4.1k views Asked by At

I am trting to build Blackberry project and generate the cod file. My environment is Windows 7 and the apache-ant version is 1.8.2. I have encountered two problems and they all lead to failure.

The command I used to build is "ant -Dbuild_env=prod" Below is part of the code in the build.xml file.

<property file="build.properties" />
<property environment="SystemVariable"/>
<!--<property name="jde.home" value="${SystemVariable.JDE_HOME}"/> -->
<property name="jde.home" value="E:\eclipse-blackberry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components"/>
<property name="bb_sign_pwd" value="${SystemVariable.BB_SIGN_PWD}"/>
<property name="jde.sigtooljar" value="${jde.home}/bin/SignatureTool.jar"/>

First problem: If I use the code

<property name="jde.home" value="${SystemVariable.JDE_HOME}"/>

to run the building, the error(error 1) is

"jde home must be a directory",

but if I use the code

<property name="jde.home" value="E:\eclipse-blackberry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components"/>

it works but still build failed. I think may be the ant cannot find the enviromental varialbe although I set the enviromental varialbe "JDE_HOME" in the Windows to "E:\eclipse-blackberry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components".

Second problem: Use the code

<property name="jde.home" value="E:\eclipse-blackberry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components"/>

instead but another error(error 2) is

"XXX\XXX\XXX\build.xml:49:Java returned: -1"

Line 48 to 50 in the build.xml is like this

48:<target name="build" description="Builds Project" depends="init"/>
49:<rapc jdehome="${jde.home}" jdkhome="${SystemVariable.JAVA_HOME}" destdir="${output.dir}" output="${app.name}_${build_env}" quiet="false" generatesourcelist="true"/>
50:<jdp title="${app.title}" type="cldc" vendor="XXX Inc." version="${app.version}" description="XXX Application" icon="${icon.path}" focusicon="true" startuptier="7" ribbonposition="0"/>

Is there any one can help and tell me why there is error 1 and error 2? Thanks.

0

There are 0 answers