We started by exploring the javac command more deeply. The -d option allows you to put class files generated by compilation into whatever directory you want to. The -d option lets you specify the destination of newly created class files.
Next we talked about some of the options available through the java application launcher. We discussed the ordering of the arguments java can take, including [options] class [args]. We learned how to query and update system properties in code and at the command line using the -D option.
The next topic was handling command-line arguments. The key concepts are that these arguments are put into a String array, and that the first argument goes into array element 0, the second argument into array element 1, and so on.
We turned to the important topic of how java and javac search for other class files when they need them, and how they use the same algorithm to find these classes. There are search locations predefined by Sun, and additional search locations, called classpaths that are user defined. The syntax for Unix classpaths is different than the syntax for Windows classpaths, and the exam will tend to use Unix syntax.
The topic of packages came next. Remember that once you put a class into a package, its name is atomic—in other words, it can't be split up. There is a tight relationship between a class's fully qualified package name and the directory structure in which the class resides.
JAR files were discussed next. JAR files are used to compress and archive data. They can be used to archive entire directory tree structures into a single JAR file. JAR files can be searched by java and javac.
We finished the chapter by discussing a new Java 5 feature, static imports. This is a convenience-only feature that reduces keying long names for static members in the classes you use in your programs.