Java Tool Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 5.00

'java' - The Java Program Launcher

This chapter describes the Java launch tool 'java'. Topics include listing of 'java' options, specifying class path with '-classpath', specifying an executable JAR file with '-jar', specifying non-standard options with '-X', launching Java programs without the console window.

'java' - Java Launching Command and Options

Launching Hello.java - My First Java Program

Option "-classpath" - Specifying Class Path

Option '-jar' - Specifying Executable JAR Files

Option '-X' - Specifying Non-Standard Options

'javaw' - Launching Java Programs without Console

Conclusions:

  • "java" is the standard application launcher in JDK.
  • "-sourcepath" specifies places where to search for class definitions of new types.
  • "-jar" specifies a JAR file and launches the class specified in the manifest file.
  • "javaw" is identical to "java" except that it will not create the console window.

Dr. Herong Yang, updated in 2008
'java' - The Java Program Launcher