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

  • Home
  • SEARCH
  • 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 140773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:40:11+00:00 2026-05-11T07:40:11+00:00

We have an ant build script for a project we’re developing for a PDA.

  • 0

We have an ant build script for a project we’re developing for a PDA. In eclipse we have a load of referenced libraries and I know how to get them to work when we run the jar on the PDA because we have a .lnk file where you can add the external libraries simply by adding the following:

512#'\J9\PPRO11\bin\j9.exe' -jcl:ppro11 -cp '\dist\WiFiTest.jar;\placelab\lib\placelab.jar' j2medemo.wifi.WiFiTest 

Adding whatever libraries we need after the -cp argument. However, I have no idea how to replicate this in the ant file (no idea is actually an exaggeration but after reading all the documentation I still don’t understand it).

We have the following .

<target name='jar' depends='prepare'>  <delete file='${dist}/${appname}.jar'/>  <delete file='${dist}/MANIFEST.MF'/>  <manifest file='${dist}/MANIFEST.MF'>     <attribute name='Built-By' value='${user.name}'/>     <attribute name='Main-Class' value='j2medemo.GUI.MapPanel'/> </manifest> <jar destfile='${dist}/${appname}.jar'      basedir='${classes}'      includes='**/*.class, **/*.jpg, **/*.gif,**/*.png,**/*.xml'      manifest='${dist}/MANIFEST.MF'      /> </target> 

I have tried adding everywhere I can think of but it doesn’t help. Can I just add it to the the include part?

Secondly, we have a run target:

<target name='run' description='run' depends='jar'>     <exec dir='${j9bin}' executable='${j9bin}\j9.exe'>         <arg line='-jcl:ppro11 -cp '${dist}\${appname}.jar;placelab\lib\placelab.jar' ${mainclass}'/>         <env key='JAVA_HOME' path='${j9home}'/>     </exec> </target> 

And I wanted to change it to run a different class so I created the following two targets:

<target name='jarSAX' depends='prepare'>  <delete file='${dist}/SAXParse.jar'/>  <delete file='${dist}/MANIFEST.MF'/>  <manifest file='${dist}/MANIFEST.MF'>     <attribute name='Built-By' value='${user.name}'/>     <attribute name='Main-Class' value='j2medemo.Routes.SAXParse'/> </manifest> <jar destfile='${dist}/SAXParse.jar'      basedir='${classes}'      includes='**/*.class, **/*.jpg, **/*.gif,**/*.png,**/*.xml'      manifest='${dist}/MANIFEST.MF'      /> </target> 

And

<target name='runSAXParser' description='run' depends='jarSAX'>         <exec dir='${j9bin}' executable='${j9bin}\j9.exe'>             <arg line='-jcl:ppro11 -cp '${dist}\SAXParse.jar' j2medemo.Routes.SAXParse'/>             <env key='JAVA_HOME' path='${j9home}'/>         </exec>     </target> 

But if I try and run this I get the following error:

Exception in thread 'main' java.lang.NoClassDefFoundError: j2medemo.Routes.SAXParse 

If anyone has any ideas/solutions for either questions that would be most helpful.

  • 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. 2026-05-11T07:40:11+00:00Added an answer on May 11, 2026 at 7:40 am

    From what I can tell, you need to add the classpath elements to the manifest. Should look something like this:

     <manifest file='${dist}/MANIFEST.MF'>     <attribute name='Built-By' value='${user.name}'/>     <attribute name='Main-Class' value='j2medemo.Routes.SAXParse'/>     <attribute name='Class-Path' value='WiFiTest.jar;placelab.jar'/>  </manifest> 

    The classpath entries should be relative to the location of the Jar in the distributable. From there, you should be able to execute the jar directly (using the -jar command line option, I’m not sure what this is for J9). Should be similar to the analogous Java call:

    java -jar MainJar.jar 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 200k
  • Answers 200k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Hibernate Session provides a doWork() method that gives you direct… May 12, 2026 at 8:02 pm
  • Editorial Team
    Editorial Team added an answer I'm pretty sure that pre-commit hooks can't be used to… May 12, 2026 at 8:02 pm
  • Editorial Team
    Editorial Team added an answer Flash rendering native Shape/Sprite/MovieClip is great for a trivial number… May 12, 2026 at 8:02 pm

Related Questions

We have an ant build script for a project we're developing for a PDA.
I'm working on an automation project for my employer. We have a pool for
We've embedded an OSGi runtime (Equinox) into out custom client-server application to facilitate plugin
I recently started using Eclipse at work for my Java servlet projects. I've been
I am evaluating the Hudson build system for use as a centralized, sterile build

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.