Java Tool
1.1 Runtime Interpreter
The Java Runtime Interpreter syntax is as follows:
Java Options ClassName Arguments
If the class uses a package, the classname should contain the name of the package.
Here is an optional item of Options:
(1) -debug: Run Interpreter in DEUG, which allows it to use together with the JDB (Java Debugger);
(2) -checksource: Check the date .java file and .class file when opening Interpreter, if .java is more. Class is new, then .class file will be recompiled;
(3) -classpath: This parameter covers environment variables classpath;
(4) -mx x: Modify the maximum value of the assigned memory, such as -mx -10m; x> 1000byte
(5) -MS x: Modify the initialization of memory; x> 1000byte
(6) -noasyncgc: Turn off the garbage collection thread, that is, it does not automatically return to the garbage. At this time, you can use the system.gc method to manually recover the garbage;
(7) --NOVERIFY: Turn off the verification function;
(8) -prof: Open the report function, the function tracks the execution of the program, and finally forms a report file, record the execution time of all methods, which is beneficial to find the bottleneck of the program;
(9) -ss x: Configure two other STACK for each thread in the Java's operating environment, one for Java code, another for C / C code, here you can -ss to change for C / C code STACK size, such as -ss 100K, minimum is 1000bytes, the default is 128K;
(10) -oss x: STACK used to modify the Java code, the default is 400K
(11) -t: Display program execution process
(12) -verbose: Displays relevant information each time .class runtime;
(13) -verbosegc: Display information at each garbage collection;
(14) -d: Allows the modification of the attribute value of System
1.2 compiler
The syntax of the Java compiler is as follows:
Javac options filename
The following is an optional options:
(1) -classpath path: Tell the compiler to use the environment variable over which ClassPathp is covered, such as:
Javac-ClassPath; / dev / animate / classes; / dev / render / classes a.java
It is best not to have spaces in the path, otherwise you will be wrong.
(2) -d path: Tell the compiler to put the compiled file under path;
(3) -g: Let the compiler generate the DEBUG table for .class files, the table exists in .class; (4) -Nowarn: Turn off the compiler;
(5) -O: Let the compiler optimize the code;
(6) -verbose: Some of the effects of -Nowarn, which allows the compiler to produce detailed information;
1.3 Applet Viewer
AppletViewer is used to view Applet programs, the syntax is as follows:
AppletViewer Options URL
AppletViewer Test.htm
Options is used to illustrate how to run AppletViewer. The current available option is -debug, allowing Applet to run in the Java debugger.
1.4 javap
Javap is an anti-assembly tool for disassembly .class files, display. Data, methods, etc. in .class, the syntax is as follows:
Javap -Options Classname: such as JavaP HelloWorld
You can use javap -help to view Options supported by Javap, which is relatively simple, here no longer introduced.
1.5 javah
Javah is used to generate Java's Header and Stub files for calling Native Method.
1.6 javadoc
Javadoc is used to generate a document for the source program, which generates multiple HTML documents at a time. So it is best to use the -D option to place these documents in the specified directory. The tool uses the syntax as follows:
Javadoc Options FileName
Filename can be .java file or package name.
Javadoc is based on the annotation of the Java source file /*........ You can include the following special labels in / * ... * /, any tag begins with @:
(1) @see classname Specifies the associated class file, Javadoc generates hyperlinks based on this tag to connect to the relevant instruction document. This can also be in detail to the method in the class, such as classname.methodname (or ClassName # methodname);
(2) @version version: Specify version number;
(3) @Author Authorname: Specify the author
This label should be tightly defined with the class along with /*....//, such as:
/ **
* A class for modeling precious gems.
*
* @see object
* @see gemology.rock
* @version 2005
* @Author jinjianxin
* /
Class gem extends rock {
// Class Definition
}
The following labels are mainly used for methods for methods:
(1) @Param paramname Description
(2) @Return Description
(3) @Exception Classname Descripton (I seem to use @Thows)