Compressing server into .jar file
cd /Users/Odinulf/folderone
jar cvf myjar.jar foldertwo


For example:

/Users/ian/code/tmp [ian@Ian-Cs-MacBook-Pro] [19:13]
&gt; jar cvf myjar.jar 8779 
added manifest
adding: 8779/(in = 0) (out= 0)(stored 0%)
adding: 8779/.DS_Store(in = 6148) (out= 355)(deflated 94%)
adding: 8779/logs/(in = 0) (out= 0)(stored 0%)
adding: 8779/logs/MasterLog.txt(in = 3044043) (out= 207357)(deflated 93%)
adding: 8779/logs/StartLog.txt(in = 6984480) (out= 685836)(deflated 90%)
/Users/ian/code/tmp [ian@Ian-Cs-MacBook-Pro] [19:13]
&gt; ls *.jar
myjar.jar


Breaking it down, the options are:


c - create a jar file
v - be verbose when you do it
f - put the bitstream in to a file instead of standard out


Then you give it the file to put the bitstream in to. In this case myjar.jar. And then you give it a list of directories and files to put in to that jar bitstream. Relative and absolute pathing for contents is generally maintained so be careful with that.