I currently have modified a program that is a .jar file. I had unarchived it and turned the .jar file into a folder so that I could edit it. Now all I need to do is change the folder back into a .jar file so that it is not accessible like a folder. How would I do this?

  • 1
    What did you edit - the parts of a jar are compiled code and not manually editable – Mark Jul 8 '13 at 11:12
  • Wrong. Might also be assets. – Max Ried Apr 18 '14 at 20:27
  • @Mark you could also supply your own compiled code. I assume the OP is talking about Minecraft. – nrubin29 Apr 18 '14 at 20:30

Jar files are almost zip files in most cases, but I would use the jar cf command for best results.


You could just use OS X compression and then rename the zip file as .jar - but then you might not have a correct manifest file. It's hard to tell without the exact files in hand.

  • What happens if you just rename it xxxxx.jar ? I've seen ML do some amazing file recognitions ... – Zo219 Jan 15 '13 at 22:45
  • 2
    You add four characters to the folder name. It's still a folder and not a zipped folder stored as one file. The amazing things are when OS X launch services send a renamed file to a different path and class of files to open it. Java might be smart enough to run on a jar named folder uncompressed, but you don't have a jar file instead of a folder (no matter what it's named). – bmike Jan 15 '13 at 23:02
  • @bmike Java can use a directory rather than a jar file - if the classpath and directory have the correct values - but this should be covered in Java tutorials – Mark Jul 8 '13 at 11:11
  • @Mark Thanks for the comments here and on the question. My java-fu is weak due to atrophy. I'm probably more dangerous than knowledgable at this point. – bmike Jul 8 '13 at 11:42

umm i tried several videos and they all said rename the file

  • 1
    I suppose if your app doesn't care that nothing is compressed and the .jar folder loads this is a nice solution, but I think the asker wants to re-achive the jar since they went to the trouble to explain it was unarchived first. – bmike Sep 12 '13 at 17:30
  • -1, this will not generate a manifest. – Navin Jan 16 '16 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .