English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
O ferramenta javadoc pode gerar documentos Java, Java 9 A saída do javadoc agora é compatível com HTML5 Padrão.
Java 9 O antigo documento
Considere o seguinte código do arquivo C:/JAVA/Tester.java:
/** * @author MahKumar * @version 0.1 */ public class Tester { /** * Método padrão para ser executado para imprimir * <p>Hello world</p> * @param args argumentos da linha de comando */ public static void main(String[] args) { System.out.println("Hello World"); } }
Usando jdk 7 Gerando documento javadoc:
C:\JAVA> javadoc -d C:/JAVA Tester.java Carregando arquivo de código-fonte tester.java... Construindo informações do Javadoc... Versão padrão do Doclet 1.7.0_21 Construindo árvore para todos os pacotes e classes... Gerando C:\JAVA\Tester.html... Gerando C:\JAVA\package-frame.html... Gerando C:\JAVA\package-summary.html... Gerando C:\JAVA\package-tree.html... Generating C:\JAVA\constant-values.html... Building index for all the packages and classes... Generating C:\JAVA\overview-tree.html... Generating C:\JAVA\index-all.html... Generating C:\JAVA\deprecated-list.html... Building index for all classes... Generating C:\JAVA\allclasses-frame.html... Generating C:\JAVA\allclasses-noframe.html... Generating C:\JAVA\index.html... Generating C:\JAVA\help-doc.html...
Executing the above command will create in C:/Generating documentation pages under JAVA command, as shown in the figure below:
Java 9 O documento gerado é compatível com HTML5 Padrão
Usando jdk 9 No comando javadoc -html5 Os parâmetros permitem que o documento gerado suporte HTML5 Padrão:
C:\JAVA> javadoc -d C:/JAVA -html5 Tester.java Carregando arquivo de código-fonte Tester.java... Construindo informações do Javadoc... Versão padrão do Doclet 9.0.1 Construindo árvore para todos os pacotes e classes... Gerando C:\JAVA\Tester.html... Gerando C:\JAVA\package-frame.html... Gerando C:\JAVA\package-summary.html... Gerando C:\JAVA\package-tree.html... Generating C:\JAVA\constant-values.html... Building index for all the packages and classes... Generating C:\JAVA\overview-tree.html... Generating C:\JAVA\index-all.html... Generating C:\JAVA\deprecated-list.html... Building index for all classes... Generating C:\JAVA\allclasses-frame.html... Generating C:\JAVA\allclasses-frame.html... Generating C:\JAVA\allclasses-noframe.html... Generating C:\JAVA\allclasses-noframe.html... Generating C:\JAVA\index.html... Generating C:\JAVA\help-doc.html...
Executing the above command will create in C:/Generating documentation pages under JAVA command, as shown in the figure below: