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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:08:27+00:00 2026-05-30T09:08:27+00:00

My Question is: How am i able to put files in a subdirectory into

  • 0

My Question is: How am i able to put files in a subdirectory into my jar via ant? Right now my Code is:

<jar destfile="${dist.dir}\wo42.jar" basedir="bin">
<manifest>
    <attribute name="Main-Class" value="org.alternativedev.wo42.App" />
    <attribute name="Class-Path" value="lib" />
</manifest>
<zipgroupfileset dir="lib/." excludes="natives/*" />
<fileset dir="data/." includes="." />

It creates a structure like

ROOT-Jar
-org
--bla
-filefromdata1
-filefromdata2

But it should be

ROOT-Jar
-org
--bla
-data
--filefromdata1
--filefromdata2

Do You know what I mean?

Greetings, BigTeddy

  • 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-05-30T09:08:28+00:00Added an answer on May 30, 2026 at 9:08 am

    Change the last line to

    <fileset dir="." includes="data/**" />
    

    No need to copy files around.

    An alternative way (which is useful if you want to have the directory in the archive to have a different name) would be

    <zipfileset dir="data" includes="." prefix="folder-name-in-jar"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to organise my CUDA code into separate object files to be
I am not able to put proper title for this question, but i will
Thanks to the answer on this stackoverflow question I was able to get the
Following the CSS style trick from this question I was able to create a
Original Question I want to be able to generate a new (fully valid) MP3
I ask this question because I'm not able to test it at the moment.
Surprisingly I was only able to find one previous question on SO about this
Similar Stack Overflow Question I want users to be able to search through my
It is a simple question to which I am not able to find the
I have few Question for which I am not able to get a proper

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.