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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:05:56+00:00 2026-05-27T04:05:56+00:00

I made an executable jar that depends on other jars with the command prompt

  • 0

I made an executable jar that depends on other jars with the command prompt using the format

jar cvfm MyJarName.jar manifest.txt *.class dependentJar1.jar dependentJar2.jar

The jar was made properly and everything seemed fine… But when run, it gets runtime errors because it can’t find the class files that my project refers to. Exploring the created jar, the other 2 jars that it depends on are in there just as they should be and they are listed in the manifest.mf class path, but for some reason java is dumb and doesn’t actually look inside those jars.

When those 2 jars are in the same directory as the owner jar, java is able to find them and it works fine. But I don’t want this; I want those jars to actually be INSIDE it. What’s the deal? How can I make an executable jar with other jars inside it work?

  • 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-27T04:05:56+00:00Added an answer on May 27, 2026 at 4:05 am

    You can use something like OneJar or jarjar (or any of several others) to pack up everything inside of a single jar.

    If you’re building with Maven you could use the Maven Shade Plugin.

    You could use a custom classloader like JarClassLoader that will allow precisely what you want.

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

Sidebar

Related Questions

I have made a java application and have packed it into an executable jar
Recently I have discovered that my release executable (made with msvc++ express 2008) becomes
Can an executable jar file can restart itself? For instance, after a user made
I have made a binary executable file disassembled using disassembler like IDA Pro. Now,
I have a small demo executable wrote in C++ that depends only on one
I have a VERY simple C# Winforms project that I made using Visual Studio
My hosting provider says my python script must be made to be executable(chmod755). What
I made a class that derives from Component: public class MyComponent: System.ComponentModel.Component { }
I need to disassemble an executable file made from C . My lecturer said
I made an application for Linux using QtCreator. The application uses two external libraries,

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.