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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:36:33+00:00 2026-06-04T19:36:33+00:00

When I run clean and build the .jar file that is being created only

  • 0

When I run “clean and build” the .jar file that is being created only runs if the lib folder is at the same folder of the .jar file.

So if I move the jar file to the desktop and leave the lib folder in the dist folder, the jar file will give me an exception.

How can I deal with this problem?

  • 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-04T19:36:34+00:00Added an answer on June 4, 2026 at 7:36 pm

    If you copy your jars into the source code directory, they will be in your final jar. Nevetheless, I am not sure if this will work 100% of the time.

    There is a great post at java-forum that states the following:

    Except for a select few circumstances, what works best for me is to
    simply merge the files manually. A .jar is basically a .zip with
    organized contents, and you can open them in almost any .zip capable
    archive program (I just use gnome’s standard archiver, File Roller,
    and it works great). Backup your jar file and open it in the archiver
    of your choice, and do the same for each library jar in the library
    directory. Drag and drop the working folders (IE, everything EXCEPT
    the META-INF Directory) from each library into your jar’s root path
    (alongside your META-INF and your app’s root package). Now drag the
    META-INF/MANIFEST.MF file from your jar to your Desktop or any other
    folder. Open it, and erase the Class-Path and X-COMMENT lines. Don’t
    forget to leave a blank newline at the end of the file! Save the new
    manifest file and drag it back to your jar’s META-INF directory,
    overwriting the old one. Test the jar.

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

Sidebar

Related Questions

I have a script that I run in terminal that runs the scan-build code
I'm running an ant build file that creates a Jar. The task looks like
I am converting ant to maven2. In build.xml, I have: <target name=clean> <delete file=${dir.dist}/${api.jarfile}
When I build my project, I run this command : mvn clean package I'd
I am trying to clean and build a jar but for some reason when
Why does maven download dependencies when I run mvn clean ? can I turn
I have a Flex client application. I need a clean up function to run
Well, title self describes it.. I need to run a sql function to clean
We run an AI programming competition in which contestants will code an AI that
While Doing clean and build i am getting following error. How to avoid this

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.