you will use, well, jar
. If you have Java installed you should also have the jar utility. I'm not sure though, if you need to have Java SDK.
Now, if you are not going to deploy java applications in a executable-jar file, you are better of using other utitility as tar, bunzip or compress. Jar has a lousy compression rate. But then again, it was not truly made for that.
Check this thread to learn how to use tar. Jar works the exactly same way, although, jar compress a file while tar does not. tar simply preserves the directory structure. Well, check the thread: