Java Tools Javadoc and Jar
1, Javadoc
Note Tag / ** * / format
Such as:
/ **
* Title: Killer class
* @ Author killer
* @ Version 1.00
* /
Where
denotes a wrap, but there is an @ mark automatically wrap
Down to Killer Construction Method Note
/ **
* This is the constructor of the Killer class
* @ param name killer's name
* /
Where @PARAM
Instructions for use:
Javadoc -d killer -version -author killer.java
-d is used to explain that it is followed by the location of file storage.
-Version and -author Description file requirements to join version information and author information
And where to comment, the comment text is starting to add in front of it.
Private annotations generally do not release because it is related to the internal structure of your class but if you want to release, you can add -Private parameters
2, JAR
1.jar cf Test.jar Test
Generate Test.jar files in the current directory, if there is already then overwriting it
-c Create a new document -f specified document name TEST is the Test folder
2.jar tf test.jar
Only list of all directories and file names of the Test.jar file
3.jar Xf Test.jar
Unzip Test.jar files to the current directory
4. Pay attention to problems
If the directory is as follows:
-- C
-- Myjava
-- Test1
-- TEST1.CLASS
---- TEST2
-- Test2.class
Need to compress them into Myjava.jar
Run C:> jar cvf myjava.jar myjava / *
The directory structure is as follows Myjava / Myjava
Obviously not what we want, do not use it.
Correction method
C: / myjava> jar cvf myjava.jar *