Читать книгу OCP Oracle Certified Professional Java SE 17 Developer Study Guide - Jeanne Boyarsky - Страница 82

Three Classpath Options

Оглавление

You might wonder why there are three options for the classpath. The -cp option is the short form. Developers frequently choose the short form because we are lazy typists. The -classpath and --class-path versions can be clearer to read but require more typing.

Table 1.2 and Table 1.3 review the options you need to know for the exam. There are many other options available! And in Chapter 12, “Modules,” you learn additional options specific to modules.

TABLE 1.2 Important javac options

Option Description
-cp <classpath> -classpath <classpath> --class-path <classpath> Location of classes needed to compile the program
-d <dir> Directory in which to place generated class files

TABLE 1.3 Important java options

Option Description
-cp <classpath> -classpath <classpath> --class-path <classpath> Location of classes needed to run the program
OCP Oracle Certified Professional Java SE 17 Developer Study Guide

Подняться наверх