The JAR file format is based on the popular ZIP file format, and is used for aggregating many files into one. Unlike ZIP files, JAR files are used not
only for archiving and distribution, but also for deployment and encapsulation of libraries, components, and plug-ins, and are consumed directly by tools
such as compilers and JVMs. Special files contained in the JAR, such as
manifests and deployment descriptors, instruct tools how a particular JAR
is to be treated.
All the Jar files that we provide contain code that when executed by the
web browser are safe to the local machine. When Java class files are run
in the web browser (otherwise known as a Java Applet) they are unable to
access any files on the local machine, and can only access URL's located
on the server it originated from. These jar files have been designed to
run within the web browser which impose the restrictions on what the jar
can and can not do. The restrictions are purely for security.
It is possible to download and save malicious jars and run them from the
desktop. When run like this they are treated as full Java Applications
(they are not run as Java Applets) and so they WOULD have full access as
any other application may.
You can digitally sign the contents of a JAR file. Users who recognize
your signature can then optionally grant your software security privileges
it wouldn't otherwise have. However we have not signed the majority of the
jar files downloaded from us as yet.
The type of files contained within a jar file will be different depending
on the course you are doing, showing the example below will indicate the
type files within the jar file.