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 7939327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:04:02+00:00 2026-06-03T23:04:02+00:00

I have download an API which has the following structure: In the folder, there

  • 0

I have download an API which has the following structure:

In the folder, there is a source folder and a build.xml file. How would I go about creating a jar out of this?

  • 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-03T23:04:04+00:00Added an answer on June 3, 2026 at 11:04 pm

    If the build.xml file doesn’t already have a target that creates a jar file, you can read about the ant jar command here:

    • http://ant.apache.org/manual/Tasks/jar.html

    However, there’s probably a good chance that the build file already does this for you.

    You can run the build script by typing ant when you’re in the directory that contains the build.xml file (after unpacking the jar).

    Just for fun, here is an example of a simple ant target that compiles some code and creates a jar.

    This target will compile every .java file in any folder named reports.

    As you can see, most of the values are using variables defined elsewhere in the script, but hopefully you get the idea…

    <target name="create-funky-jar" depends="some-other-funky-targets">
        <javac
          srcdir="${src.dir}"
          includes="**/reports/*.java"
          destdir="${build.classes.dir}"
          deprecation="${javac.deprecation}"
          source="${javac.source}"
          target="${javac.target}"
          includeantruntime="false">
          <classpath>
            <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
          </classpath>
        </javac>
    
        <jar destfile="${dist.dir}/SomeFunkyJar.jar"
             basedir="${build.classes.dir}"
             includes="**/reports/*.class"/>
      </target>
    

    The above was just created by modifying a build script generated by NetBeans.

    You can run the above target by adding it to a build.xml file and typing the following from the command line:

    ant create-funky-jar
    

    Note: You’ll have to define all the variables for it to actually work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have download entire Eclipse Helios/Indigo version Source Code. Now I want to work
When I have download sample code from this link and than try to build
I have to build the dojo tool kit for dojo optimisation. I have download
I have a download page where there are 3 download options: Word, Zip, and
I have a download handler that will download the file when in IE but
I have made an application which has been tested on the emulator, some 2.2
I am working on an API which returns me a zip file containing multiple
My desktop application has to download a file from the internet. The path to
I have a question about the use off the http api from the company
Greetings I'm trying to get an xml file from a website which requires me

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.