Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7965425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:09:06+00:00 2026-06-04T06:09:06+00:00

I am having trouble getting my Ant script (for BlackBerry build) to run the

  • 0

I am having trouble getting my Ant script (for BlackBerry build) to run the preverify.exe command & pass the correct parameters to it.


In the command prompt (Windows 7), this works 100% – the parameters as given work properly:

preverify -verbose -classpath C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar -d build\classes\preverified build\classes\preverified build\classes\unverified

I tried to put this into my Ant script using the following target – trying to use the same parameters:

<target name="preverify">
    <mkdir dir="${dest.dir}/classes/preverified" />
    <exec executable="${jde.home}/bin/preverify">
        <arg value="-verbose" />
        <arg value="-classpath C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar" />
        <arg value="-d build\classes\preverified" />
        <arg value="build\classes\unverified" />
    </exec>
</target>

This does not work. I get the following error:

Illegal option 
-classpath C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar
  • this classpath was perfectly acceptable from the command line (often java commands accept JAR files as directories, since they are basically ZIP files).

How can I get Ant to send the correct parameters to this command, as in the command line version? There must be something about exec that I’m missing?


Here is the full Ant output from running this target in verbose mode, if it helps:

Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi\build.xml
Detected Java version: 1.6 in: C:\Java\jdk1.6.0_24\jre
Detected OS: Windows 7
parsing buildfile C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi\build.xml with URI = file:/C:/development/ant/test_using_javac_jar_preverify_then_rapc/Cobi/build.xml
Project base dir set to: C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi
parsing buildfile jar:file:/C:/development/tools/apache-ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/development/tools/apache-ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Importing file C:\development\ant\common\constants.xml from C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi\build.xml
Overriding previous definition of reference to ant.projectHelper
parsing buildfile C:\development\ant\common\constants.xml with URI = file:/C:/development/ant/common/constants.xml
parsing buildfile jar:file:/C:/development/tools/bb-ant-tools/bb-ant-tools.jar!/bb-ant-defs.xml with URI = jar:file:/C:/development/tools/bb-ant-tools/bb-ant-tools.jar!/bb-ant-defs.xml from a zip file
Overriding previous definition of reference to ant.projectHelper
 [property] Loading C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi\project.properties
 [property] Loading C:\development\ant\common\jde5.0.properties
 [property] Loading C:\development\ant\common\common.properties
[pathconvert] Set property net_rim_api.jar.dos = C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar
Build sequence for target(s) `preverify' is [preverify]
Complete build sequence is [preverify, javac, build, sign, clean, ]

preverify:
    [mkdir] Skipping C:\development\ant\test_using_javac_jar_preverify_then_rapc\Cobi\build\classes\preverified because it already exists.
     [exec] Current OS is Windows 7
     [exec] Executing 'C:\development\tools\bb-jde\jde5.0\components\bin\preverify' with arguments:
     [exec] '-verbose'
     [exec] '-classpath C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar'
     [exec] '-d build\classes\preverified'
     [exec] 'build\classes\unverified'
     [exec]
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.
     [exec] preverify: Illegal option -classpath C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar
     [exec]
     [exec] Usage: preverify [options] classnames|dirnames ...
     [exec]
     [exec] where options include:
     [exec]    -classpath     <directories separated by ';'>
     [exec]                   Directories in which to look for classes
     [exec]    -d <directory> Directory in which output is written (default is ./output/)
     [exec]    -cldc1.0       Checks for existence of language features prohibited
     [exec]                   by CLDC 1.0 (native methods, floating point and finalizers)
     [exec]    -nofinalize    No finalizers allowed
     [exec]    -nonative      No native methods allowed
     [exec]    -nofp          No floating point operations allowed
     [exec]    @<filename>    Read command line arguments from a text file
     [exec]                   Command line arguments must all be on a single line
     [exec]                   Directory names must be enclosed in double quotes (")
     [exec]
     [exec] Result: 1

BUILD SUCCESSFUL
Total time: 1 second
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:09:08+00:00Added an answer on June 4, 2026 at 6:09 am

    The way you are passing the parameters is incorrect. The space between the -classpath tag, and the JAR name is not allowed.

    You must break that line (and the -d below it) onto 2 lines. This works:

        <exec executable="${jde.home}/bin/preverify">
            <arg value="-verbose" />
            <!-- classpath to the RIM api -->
            <arg value="-classpath" />
            <arg value="C:\development\tools\bb-jde\jde5.0\components\lib\net_rim_api.jar" />
            <!-- destination folder -->
            <arg value="-d" />
            <arg value="build\classes\preverified" />
            <!-- source folder -->
            <arg value="build\classes\unverified" />
        </exec>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble getting the Build command in Sublime Text 2 working with
I'm having trouble getting the Apache Camel plugin to run in grails-1.1.1. Here's the
I am having a little trouble getting my deployment task in ant to function.
Having trouble getting the correct bounds for my iPad application when launching it in
I'm having trouble getting my cruisecontrol script to do something. I want to call
I am having trouble getting one of my Android projects under Eclipse to run
I'm having trouble getting the correct scope within prototype's Ajax.Request class. What I'm trying
Having trouble getting success from this... <!-- Ajax --> <script type=text/javascript> $('a.clickup').click(function (event) {
I'm having trouble getting ThinkingSphinx to recognize my conditions. My Discussion model includes the
I'm having trouble getting Spring.Net to log, using Log4Net. I'm particulary interested in seeing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.