• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1095
  • Last Modified:

How to add a class to a .jar file

I have a Java program that has many .jar files.  I recently received two class files that need to be added to one of the .jar files.   How can I add these to a jar file?
0
jbaird123
Asked:
jbaird123
  • 2
  • 2
  • 2
  • +1
1 Solution
 
rawinnlnx9Commented:
0
 
rawinnlnx9Commented:
Here is this explanation of it though. It goes into much more detail.

http://www.lkn.ei.tum.de/arbeiten/faq/man/JAVA-tutorial/jar/basics/update.html
0
 
objectsCommented:
jar uf <class file name> <jar file name>

Make sure you include the class in its package/folder structure
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
objectsCommented:
oops, wrong way around. should be:


jar uf <jar file name> <class file name>
0
 
calboronsterCommented:
To make it very very simple..

rename the file to .zip
open and extract with winzip or any zip software (a folder structure will be extracted)
copy your file in the required folder location
zip the folder back to the same name as your jar and you are done.

Remember the folder structure after zipping should be exactly the same as before for things to work.
0
 
jbaird123Author Commented:
Thank you.
0
 
calboronsterCommented:
Thank you jbaird for the grade and the points.
Have a nice day.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now