There are many Java developers who write code and never consider that their application might someday run on a Mac. After all, the whole concept behind Java is that the code can be written once and run anywhere. In many cases, these programs will run fine on Mac OS X. One of the biggest advantages of including a JVM with every Mac is the large number of programs that are enabled on the platform. In this section you will see how to run Java programs that aren’t specifically packaged for use on a Mac.
You have seen that a
jar file is a Java archive
much like a
file. Try this out:
Make a copy of the file
Jar Bundler.jar that you
found inside the JarBundler application.
Make a copy of
Jar Bundler.jar with the name
JarBundler.zip file using the version
of StuffIt Expander included with Panther.
When you do, you end up with a folder containing many class files and
two subdirectories. The
META-INF folder contains
a single file named,
MANIFEST.MF. This directory
and file are what differentiates a
jar file from
zip file. The
file may contain the name of the Java class file intended
to initiate the application; this makes the
There are many advantages to working with
files instead of the individual class files. When you zip up a bunch of files scattered across directories, not only is the result compressed and smaller than the sum of the individual files, you ...