Chapter 14. Packaging and Deploying Your Java Applications
This chapter describes how to package and deploy your Java applications including client-side and server-side applications. It discusses Java Web Start, JAR packaging, JAR signing, building WAR files, and CLASSPATH manipulation. You'll walk through the different types of Java applications and get a brief introduction to each as well as information on a few useful utilities that you can use when creating, configuring, and deploying your own applications.
Examining Java Classpaths
One of the most potentially frustrating aspects of Java is the classpath. If you have coded in Java even for a short length of time, you're already familiar with the classpath. It is a system environment variable that directs the Java Virtual Machine (VM) to a set of classes and/or JAR files. This is how the VM knows where code used by the program resides.
At times, you wind up needing a class and have no idea which JAR file has this class. You might add a bunch of JAR files to your classpath, hoping you'll accidentally add the right one in, never truly knowing which JAR files are not needed. Many people complain about DLL Hell on Windows, but a similar mismanagement of the classpath and the many files it points to can create the same situation with Java. If you use a development environment such as Eclipse, you are somewhat insulated from this problem because it is easy to manage your classpath through the GUI. However, in a deployment scenario, you ...
Get Professional Java® JDK®, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.