If you want to skip some work... use a zip utility. Create a zip file and then change the extension.
Maybe this will save you some work. As a beginner it will suffice.
For a more professional work learn
ant. Also the majority of
IDE's have a jar/war/ear/rar utility. JAR in command line is nice but not necessary to learn in the hard way.