This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Building a jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Building a jar" Watch "Building a jar" New topic
Author

Building a jar

Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

Hi,

How does one build a jar of a project created in Eclipse from the command line.

I tried the following from the command prompt:
Project folder>jar cf test.jar *.class

But the result was :
*.class : no such file or directory

Priety.


Priety.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41582
    
  54
I'm guessing that the class files aren't in the directory where you're issuing the jar command. You need to specify the path to where they live: Packaging Programs in JAR Files


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: Building a jar