Compiling and Launching

From Suhrid.net Wiki
Revision as of 04:13, 16 June 2011 by Suhridk (talk | contribs)
Jump to navigationJump to search

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