Computer is a complex machine and people from around the world have used their own methods to communicate with it. Since it is a machine, it requires being communicated using machine languages. This is why there are so many programming languages. Now, each programming language has platform compatibilities. A program written in a particular language might run on Windows PC but not on Macintosh. However, there are languages that can run on any platform without any problems. Java is one of those languages and it runs smoothly on any platform if there is Java Runtime Environment on that platform.
Now, when you are on a Java supported platform you will encounter Java JAR files. This is a file format just like there are other file formats like JPEG, MP3, AVI etc. Now, if you have the Java Runtime Environment installed on your device, you could open the file easily and without any additional steps. From this you can also conclude that this type of file can be opened on any kind of platform. If there is JRE on your platform, opening and playing around with a JAR file should not be a problem. But what exactly is a JAR file?
The most common file format you must be familiar with is mp3. You already know the kind of data this file type holds in it. When it comes to a JAR file, it is a package file format. What this means is that it contains a whole package within it i.e. different types of files. These aggregated files within a JAR file could be the metadata pertaining to those files, the resources and even the Java class files. Basically, these files are the archive files because their foundation is built on ZIP. If you have the JDK, you could use the jar command and the files within the package will be extracted.
Computer users can also make use of the zip tools to open the JAR files. There are many things that make a JAR file a great file format. First, with JRE you could run your JAR file on any platform. Second, this particular file format has compression support. This allows your file to be of a very small size while containing many different items within it. With a reduced file size you can download a lot of data without taking a big toll at your bandwidth.
When many different files are aggregated into one file – just like they are on JAR file – it allows you to download Java applets along with the required components in just one download. You don’t have to begin a new download for downloading every piece of content of the applet. Listing contents of JAR files is also possible using various methods. The methods can differ based on what tool you are using for listing the content. A jar tf command on JDK will list the contents for you. You could get more information about JAR files and Java from Java-Forums.org.