UK Sales: 0800 035 6364 | | We'll Call You

A jar file is simply a collection of classes that are packaged together for easy of distribution. A war file is pretty much the same thing for web applications. You put jar files into the classpath of applications in order to use whats in them. Similarly you deploy a war file into the webapps directory of a java servelt container in order to deploy it as a web app.


The basic jar syntax is;

jar -[options] jar-file input-file(s)

jar -cvf jam.jar *.*

The above options are defined as;

- c – create
- v – verbose
- f – file

The name of the jar file is jam.jar and the files used to create this jar file are basically everthing in the current directory (*.*).

You can also extract a jar file using the option “x” (extract)

jar -xvf jam.jar *.*

Finally to view the contents of a jar file use the “t” option.

jar -tvf jam.jar

A  war file is pretty created in exactly the same way. All you need to do is create a file with a  .war extension rather than a .jar extension.

jar -cvf jam.war *.*

2020Media is a leading provider of small business Wi-Fi hotspots. If you want to offer free Wi-Fi to your customers or users, our service could be exactly what you are looking for. Our Hotspots are managed in the cloud, ultra-reliable and give you loads of information about behaviour patterns of your users. Read More   Read more...
2020Media introduces Moodle Hosting - UK servers and UK Moodle experts setup your site ready to use. Read more...
Special Offer for Longer Registration Periods Register or renew a .com, .net or .org domain name for 5 years we'll include 1 year free*. Read more...
2020Media is now offering zero-click installation of the popular TYPO3 content management system. Read more...

Our blog is regularly updated with news, tips and industry opinion.


  • AggieWestons
  • baker-and-mckenzie
  • arts-council-england
  • Big Finish
  • barratt-developments-logo
  • City-of-Lincoln-council-logo
  • brora-logo
  • DenisMacShane
  • Construction-Industry-Council
  • colchester