File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes cant add class file to jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "cant add class file to jar" Watch "cant add class file to jar" New topic

cant add class file to jar

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110

i'm trying to add a class file to an existing jar using the following command (win2k Os)

jar uf basiswebtop.jar list.class

i've declared the class as a member of the package.



One day all greenhorns will run free ...
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
Confession from an experienced Java developer:

If I encounter the need to add any kind of file (*.class included) to a ZIP, I mean, a JAR file, I use a ZIP utility like WinZip (which is not the only ZIP util).

I hope I don't become ostracized from the Java community for confessing.

Reality Check: Obviously I develop in a Win32 environment, not UNIX.

BTW: ZIP and JAR files are the same. I think they are the same even when MAXIMUM compression is used in the ZIP utility. But don't take my word for it.

If you use NO COMPRESSION in the ZIP utility, they are the same. (Didn't MANIFEST files go the way of Compuserve?)

Hope I didn't confuse more than supply encouragement for further study?

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
I agree. Here's the link:
subject: cant add class file to jar
It's not a secret anymore!