Compiling and Launching
From Suhrid.net Wiki
Jump to navigationJump to searchjavac
- javac by default places the generated class files in the same directory as the source files.
- use the javac -d option to place the class files in some other directory.
- if the directory does not exist, there will be an error.
- the directories for the package structure will however be automatically created by javac.
- Options:
- -classpath and -cp are the same.
- The argument can be the path to the directory which contains the package structure of the class files.
- The argument can be the location of the jar file - including the file name (which contains the package structure of the class files.)