O'Reilly logo

Java™: A Beginner's Tutorial, Second Edition by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. java

  • The java program is a tool for launching a Java program. Its syntax has two forms.

java [options] class [argument ...]
java [options] -jar jarFile [argument ...]
  • where options represents command-line options, class the name of the class to be invoked, jarFile the name of the jar file to be invoked, and argument the argument passed to the invoked class's main method

Options

There are two types of options you can pass to java, standard and nonstandard.

Standard Options

-client
  • Select the Java HotSpot Client VM.

-server
  • Select the Java HotSpot Server VM.

-agentlib:libraryName[=options]
  • Load native agent library libraryName. Example values of libraryName are hprof, jdwp=help, and hprof=help.

-agentpath:pathname[=options]
  • Load a native agent library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required