Difference between revisions of "Compiling and Launching"

From Suhrid.net Wiki
Jump to navigationJump to search
(Created page with "* 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 th...")
 
Line 1: Line 1:
 +
 +
== javac ==
 +
 
* javac by default places the generated class files in the same directory as the source files.
 
* 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.
 
* 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.
 
* if the directory does not exist, there will be an error.
 
* the directories for the package structure will however be automatically created by javac.
 
* 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.)
 +
 +
[[Category:OCPJP]]

Revision as of 04:13, 16 June 2011

javac

  • 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.)