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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:38:26+00:00 2026-05-14T02:38:26+00:00

My Java application has got a package structure similar to this: src/com/name/app src/com/name/app/do src/com/name/utils/db

  • 0

My Java application has got a package structure similar to this:

src/com/name/app 
src/com/name/app/do 
src/com/name/utils/db

How would I go about compiling Java files in these directories in to a runnable jar? I need to package required libraries into the generated JAR (jdbc).

I’ve always done these things in Eclipse but now I need to supply a couple of people with a way to compile the repository without the use of eclipse and I was thinking of making a makefile or a script that invokes the necessary javac pattern.

  • 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-14T02:38:26+00:00Added an answer on May 14, 2026 at 2:38 am

    First of all, consider using Ant for such a task.

    But since you asked for a manual process, you need to first create a manifest file, like so:

    Manifest-Version: 1.0
    Created-By: 1.6.0 (Sun Microsystems Inc.)
    Class-Path: lib/jdbc.jar lib/otherlib.jar
    Main-Class: com.name.app.MainClass
    

    Replace the contents of Class-Path with your libs, and Main-Class with the fully qualified name of your main class.

    Then, you need to generate the actual .jar, using the following command:

    jar cfm app.jar MANIFEST.MF src/com/name/app/*.class src/com/name/app/do/*.class
    

    Where MANIFEST.MF is the previously mentioned manifest file, and the rest is the folders where your .java classes lie in.

    Finally, to run your app, you simply execute: java -jar app.jar.

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

Sidebar

Related Questions

I have a JSP java application that has a name AAA-master so currently my
I have built a Java application that has some dependencies (~10). I would like
I've got a Java WebStart application which has an audio player in it that
My java application has a button which should open a user selected Excel file
My Java application has multiple frames. Some of them are set to be always
Our Java application has a number of modules which implement a common interface. By
I have a Java Application which has to load an DLL with a few
I'm building a Java application that has parts that require daily update. I want
So I have a strange problem, I have a java swing application that has
So I am working on a java application, and the customer has requested the

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.