CCL Home Page
Up Directory CCL t020.html
slide

Jan K. Labanowski: "Tomcat, servlets, JSPs and other friends"

Java jar utility

Java is an object oriented language which places emphasis on code reuse. It is typical to reuse code previously developed and make it available within current project. Even Standard edition consists of about 3000 classes providing basic functionality and practices. Managing this Zoo as individual classes would be cumbersome. You can reuse the classes previously developed either by:

  • listing directories which contain classes in the CLASSPATH.
  • incorporating classes in the jar file, and adding jar to the CLASSPATH.
The jar file stands for Java ARchive. The utility to process these files is called jar. It uses similar syntax as popular UNIX tar utility. Format of the jar is that of zip file rather than tar file, and these files can be created/unpacked also with the popular zip/unzip utility, i.e.:
    unzip some.jar
and
    jar xvf some.jar
do the same thing: unpack the archive.

Modified: Wed Feb 20 06:51:33 2002 GMT
Page accessed 2759 times since Mon Feb 3 15:33:44 2003 GMT