I am using JDK 11 on Apache netbeans 10.
The main
method is depricated since java 9 and marked for a removal where there is no alternative
All of my attempts in command line ended up with
javadoc: error - Cannot find doclet class Exception
When I try:
com.sun.tools.javadoc.Main.execute (new String[]{"-doclet",TestVarElement.class.getName(),"C:\\Users\\Super3\\Documents\\NetBeansProjects\\MyProject\\src\\pk\\TestVarElement.java"});
I get:
javadoc: error - Doclet class pk.TestVarElement does not contain a start method
Start
method is depricated and replaced by run
method, the previous set up is working for java 8 and older, I want the equivalent for 9,10,11.
I looked at the documentation for DocumentationTool and the relevent materials but I did not find a single working example.
Is there any way we can run a Doclet/DocletEnvironment programmatically or a working example from commandline?