

Try it and see what error message is generated. What happened? Don't take my word for it. Then let's try it at the command line to see what error messages might be generated: So, does it work yet? I mean, can we just double click on it and our application executes? Try it. If you weren't expecting that manifest file, then read up on JAR files in the aforementioned trail of Sun's Java Tutorial. Indeed, a new JAR file named FooJar.jar was created and using my favorite zip tool, I see the contents include two files - our class file and the expected manifest file. No error messages, it must have done something successfully. So, let's name our JAR file FooJar.jar and add our single class file: How do we do this? The Lesson on Using JAR Files: The Basics tells just what to do: Here's one that displays a Frame when executed (and the Frame can be closed): OK, we'll need an application to include. What is a jar file? A file format that enables us to bundle multiple files into a single archive file and it can provide the function of running a specified application when the jar file is double clicked (assuming that Java 1.2 or newer is properly installed on the user's machine).


Where do we begin to learn about JAR files? The JAR Files trail of Sun's Java Tutorial. Let's create a JAR file such that double clicking on the file will cause our desired Java application to run. This is part of the package of Game Tutorials threads, for which a complete listing of threads can be found in The Table Of Contents.
