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

  • Home
  • SEARCH
  • 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 7035153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:16:15+00:00 2026-05-28T01:16:15+00:00

In my workflow for creating a jar to distribute my code, I currently: right-click

  • 0

In my workflow for creating a jar to distribute my code, I currently:

  1. right-click on my project in Eclipse
  2. select “Export”
  3. select “JAR file”
  4. uncheck the top-level files like .classpath, .project
  5. check only “export generated class files”
  6. click “finish”

This ensures the .class files are up-to-date and creates the jar. I would like to do this same thing from the command line, but most documentation for creating jars seems to be just jarring up files that already exist, without the phase of creating the .class files. How can I do this from the command line?

  • 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-28T01:16:15+00:00Added an answer on May 28, 2026 at 1:16 am

    To manually create a jar file, you can use the “jar” utility.
    A jar file is basically an archive file (in fact, you can use any zip tool to extract the jar contents). To create a jar file, you specify the “c” option and all the .class files that you compiled and that you want included. The jar command-line mimics the tar command. So, for example, to add your class files whose root folder is com, you type:

      jar cf test.jar com
    

    Optionally, you can add manifest data in the form of a manifest file to specify a default executable and other information.

    However, a simpler way to build a jar file is to just use ant.

    Checkout this tutorial from the ant website, which gives an example of a typical ant build file:
    http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html

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

Sidebar

Related Questions

I'm creating a custom WSS workflow in Visual Studio 2008 and have a 'create
Our team is creating a new recruitment workflow system to replace an old one.
I'm creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0.
Currently my workflow with Emacs when I am coding in C or C++ involves
I currently have a task list, some of them contain file attachments. As part
I have a Workflow 4.0 app that generates emails. In a dialog for creating
I am currently working on some personal tests and benchmarks to compare the workflow
I'm currently trying to get into QT4 and figure out a workflow for myself.
I'm Creating a workflow that needs to send the users an email on set
We have used the Factory/Singlton pattern for creating a workflow runtime. When we run

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.