
Java Archive (JAR) files were introduced to solve this problem. A JAR file
groups all the classes in an application and it ensures that the paths are
also preserved.
Internally, JAR files are zip files so you can create them with WinZIP or
another zip tool. In practice, however, it is easier to use the JAR application
included in the JDK.
You create a JAR file with the following command:
jar cvf xdic.jar com\psol\xdic\XDic.class
If everything goes well, this command creates a new file xdir.jar. You can
use this file in a classpath instead of your application directory, as in
set classpath=c:\jetty\lib\javax.servlet.jar;
➥c:\jetty\lib\com.mortbay.Jetty.jar;xdir.jar ...