java-The Java Interpreter

   

java ” The Java Interpreter

The Java interpreter is what you use to run your compiled Java application.

The syntax for the interpreter is

 java [-options] class [args...] 

where class only includes the name of the class and not the extension ( .class ). If the class belongs to a package, the class name should include the fully qualified package name with the class. The standard Java interpreter options are listed in Table B.1.

Table B.1. Java Interpreter Options
Option Description
-cp dirs or jars/zips java looks for class files in the specified directories, DIRS . For multiple directories, a colon (in UNIX) or semicolon (in DOS) is used to separate each directory. JAR files and/or ZIP files can also be specified, separated also by the separator character mentioned previously. “classpath is also supported for backward compatibility.
-help or -? Displays all the options.
-version Displays the version of the SDK that is used to compile the source code and then exits.
-showversion Similar to the -version command. It will show the version information, but continue to execute any additional commands.
-verbose Enable verbose output.
-Xdebug Used with remote Java files that are to be debugged later with the jdb tool. The interpreter generates a password for you, which is used in the jdb 's password option (see the section " jdb ” The Java Debugger" later in this chapter).
-Xprof Outputs cpu profiling data.
-Xnoclassgc Disables class garbage collection.
-Xmx val Sets the maximum Java heap size to the value specified by val . (Use the letters m and k to specify megabytes or kilobytes for the value of val .)
-Xms val Sets the initial Java heap size to the value specified by val . (Use the letters m and k to specify megabytes or kilobytes for the value of val .)

Caution

The Java interpreter also includes nonstandard options that are used less frequently. There are no guarantees that these will be supported in future releases of Java, so use this carefully .


   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net