
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
How to create Html5 compliant Javadoc in Java 9?
Before Java 9, we have to search in google to find out particular packages, class, interface, and method information. Since Java 9, Javadoc includes search options in the API documentation itself, and the output is HTML5 compliant.
In the below example, we have created the "JavaDocTest.java" file in the "C:/JAVA" folder.
Example
public class JavaDocTest { /** * Default method to be run to print * Tutorialspoint * @param args command-line arguments */ public static void main(String args[]) { System.out.println("Tutorialspoint"); } }
The documentation generated by Java 9 is compatible with the HTML5 standard. By using the "-html5" parameter in the jdk 9 Javadoc command allows the generated document to support the HTML5 standard.
C:\JAVA>javadoc -d C:/JAVA -html5 JavaDocTest.java Loading source file JavaDocTest.java... Constructing Javadoc information... Standard Doclet version 9.0.4 Building tree for all the packages and classes... Generating C:\JAVA\JavaDocTest.html... Generating C:\JAVA\package-frame.html... Generating C:\JAVA\package-summary.html... Generating 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 can generate a document page under the "C:/JAVA" folder as shown below:
- Related Articles
- How to create a module in Java 9?
- How to create static VarHandle in Java 9?
- How to create JShell instance programmatically in Java 9?
- How to create a thread in JShell in Java 9?
- How to create scratch variables in JShell in Java 9?
- How to create wrapper objects in JShell in Java 9?
- How to create a process using ProcessBuilder in Java 9?
- How to create Definition Lists in HTML5?
- How to write, generate and use Javadoc in Eclipse?
- How to create a class and object in JShell in Java 9?
- How can we create an unmodifiable Set in Java 9?
- How can we create an unmodifiable List in Java 9?
- How to Create Navigation Links using HTML5?
- How to create nofollow link using HTML5
- How to create a rainbow using HTML5

Advertisements