Home Segments Top Top Previous Next

1068: Mainline

If you have divided your application into packages—such as the application, model, and view packages—then your directory structure will include a directory with application, model, and view subdirectories. To combine all the class files in those subdirectories into a JAR file, you type the following, once you have made the current directory be the parent directory of the application, model, and view directories.

jar -cmf manifest.txt MovieApplication.jar application model view 

If you want only the class files in those directories, you use a wildcard—by typing, for example, application/*.class, instead of application.