October 2011
Beginner
432 pages
10h 18m
English
You can run Java applications from a command line using java, a program that invokes the JVM. NetBeans uses this program behind the scenes when you run programs. When a Java program is run as a command, the JVM loads the application. The command can include extra items of information, as in this example:
java TextDisplayer readme.txt /p
Extra information sent to a program is called an argument. The first argument, if there is one, is provided one space after the name of the application. Each additional argument also is separated by a space. In the preceding example, the arguments are readme.txt and /p.
If you want to include a space inside an argument, you must put quotation marks around it, as in the following: ...
Read now
Unlock full access