Cannot run Doclet class given by OracleJava inner class and static nested classOGNL setValue target is nullStatic Classes In JavaWhat is the difference between canonical name, simple name and class name in Java Class?Running the Standard Doclet Programmaticallywhy spill failure happens for Custom Data Type in HadoopExecutorService workStealingPool and cancel methodIncomplete Javadoc in Java 8?Hibernate : Why FetchType.LAZY-annotated collection property eagerly loading?Running custom doclet from command line on project with maven

Does ultrasonic bath cleaning damage laboratory volumetric glassware calibration?

How many codes are possible?

What would Earth look like at night in medieval times?

Can a US president have someone sent to prison?

Fedora boot screen shows both Fedora logo and Lenovo logo. Why and How?

Transition from ascending to descending a rope

How well known and how commonly used was Huffman coding in 1979?

How to positively portray high and mighty characters?

Why does Darth Sidious need bodyguards?

Why do some games show lights shine through walls?

How to determine what is the correct level of detail when modelling?

Do French speakers not use the subjunctive informally?

STM Microcontroller burns every time

Mount a folder with a space on Linux

Short story with brother-sister conjoined twins as protagonists?

Simple object validator with a new API

If my Scout rogue has used his full movement on his turn, can he later use the reaction from the Skirmisher feature to move again?

Layout of complex table

Is there a short way to compare many values mutually at same time without using multiple 'and's?

Should I tell my insurance company I'm making payments on my new car?

Why cruise at 7000' in an A319?

Why would people reject a god's purely beneficial blessing?

Should I include salary information on my CV?

Cascading Repair Costs following Blown Head Gasket on a 2004 Subaru Outback



Cannot run Doclet class given by Oracle


Java inner class and static nested classOGNL setValue target is nullStatic Classes In JavaWhat is the difference between canonical name, simple name and class name in Java Class?Running the Standard Doclet Programmaticallywhy spill failure happens for Custom Data Type in HadoopExecutorService workStealingPool and cancel methodIncomplete Javadoc in Java 8?Hibernate : Why FetchType.LAZY-annotated collection property eagerly loading?Running custom doclet from command line on project with maven






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I want to experiment with Doclets (JDK 9), so i tried everything step by step given in this link. I have not add anything custom in Example class. It is exactly as Oracle gives it (I just added the imports).



Oracle gives the command:



javadoc -doclet Example 
-overviewfile overview.html
-sourcepath source-location
source-location/Example.java


Now when i run the given javadoc command, i get the following error:




javadoc: error - Cannot find doclet class Example




I tried some variations of the command since it seems to be a problem with directors but all of my tries have failed.



I place Example.java in my Desktop folder: C:UsersGeorgeDesktop



So, in my command line I cd C:UsersGeorgeDesktop. Then javac Example.java (in case it wants it compiled).



And then, i try all the following commands, getting the same error.



javadoc -doclet Example -overviewfile overview.html -sourcepath ./ ./Example.java


.



javadoc -doclet Example -overviewfile overview.html -sourcepath "C:UsersGeorgeDesktop" "C:UsersGeorgeDesktopExample.java"


(+without quotes)



javadoc -doclet Example -overviewfile overview.html"C:UsersGeorgeDesktopExample.java"



I tried few other things found in SO, but again, nothing works. What am i missing? Should not the given example work?



Example class (in case you see something i do not):



public class Example implements Doclet 
Reporter reporter;
String overviewFile;

public static void main(String[] args)


public Example()
// TODO Auto-generated constructor stub


@Override
public void init(Locale locale, Reporter reporter)
reporter.print(Kind.NOTE, "Doclet using locale: " + locale);
this.reporter = reporter;


public void printElement(DocTrees trees, Element e)
DocCommentTree docCommentTree = trees.getDocCommentTree(e);
if (docCommentTree != null)
System.out.println("Element (" + e.getKind() + ": " + e + ") has the following comments:");
System.out.println("Entire body: " + docCommentTree.getFullBody());
System.out.println("Block tags: " + docCommentTree.getBlockTags());



@Override
public String getName()
return "Example";


@Override
public Set<? extends Option> getSupportedOptions()
Option[] options = new Option()
private final List<String> someOption = Arrays.asList("-overviewfile", "--overview-file", "-o");

@Override
public int getArgumentCount()
return 1;


@Override
public String getDescription()
return "an option with aliases";


@Override
public Option.Kind getKind()
return Option.Kind.STANDARD;


@Override
public List<String> getNames()
return someOption;


@Override
public String getParameters()
return "file";


@Override
public boolean process(String opt, List<String> arguments)
overviewFile = arguments.get(0);
return true;

;
return new HashSet<>(Arrays.asList(options));


@Override
public SourceVersion getSupportedSourceVersion()
return SourceVersion.latest();


@Override
public boolean run(DocletEnvironment docEnv)
reporter.print(Kind.NOTE, "overviewfile: " + overviewFile);
// get the DocTrees utility class to access document comments
DocTrees docTrees = docEnv.getDocTrees();

// location of an element in the same directory as overview.html
try
Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next();
DocCommentTree docCommentTree = docTrees.getDocCommentTree(e, overviewFile);
if (docCommentTree != null)
System.out.println("Overview html: " + docCommentTree.getFullBody());

catch (IOException missing)
reporter.print(Kind.ERROR, "No overview.html found.");


for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements()))
System.out.println(t.getKind() + ":" + t);
for (javax.lang.model.element.Element e : t.getEnclosedElements())
printElement(docTrees, e);


return true;











share|improve this question
























  • Have you compiled the class?

    – JB Nizet
    Mar 25 at 11:24











  • @JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

    – George Z.
    Mar 25 at 11:25

















2















I want to experiment with Doclets (JDK 9), so i tried everything step by step given in this link. I have not add anything custom in Example class. It is exactly as Oracle gives it (I just added the imports).



Oracle gives the command:



javadoc -doclet Example 
-overviewfile overview.html
-sourcepath source-location
source-location/Example.java


Now when i run the given javadoc command, i get the following error:




javadoc: error - Cannot find doclet class Example




I tried some variations of the command since it seems to be a problem with directors but all of my tries have failed.



I place Example.java in my Desktop folder: C:UsersGeorgeDesktop



So, in my command line I cd C:UsersGeorgeDesktop. Then javac Example.java (in case it wants it compiled).



And then, i try all the following commands, getting the same error.



javadoc -doclet Example -overviewfile overview.html -sourcepath ./ ./Example.java


.



javadoc -doclet Example -overviewfile overview.html -sourcepath "C:UsersGeorgeDesktop" "C:UsersGeorgeDesktopExample.java"


(+without quotes)



javadoc -doclet Example -overviewfile overview.html"C:UsersGeorgeDesktopExample.java"



I tried few other things found in SO, but again, nothing works. What am i missing? Should not the given example work?



Example class (in case you see something i do not):



public class Example implements Doclet 
Reporter reporter;
String overviewFile;

public static void main(String[] args)


public Example()
// TODO Auto-generated constructor stub


@Override
public void init(Locale locale, Reporter reporter)
reporter.print(Kind.NOTE, "Doclet using locale: " + locale);
this.reporter = reporter;


public void printElement(DocTrees trees, Element e)
DocCommentTree docCommentTree = trees.getDocCommentTree(e);
if (docCommentTree != null)
System.out.println("Element (" + e.getKind() + ": " + e + ") has the following comments:");
System.out.println("Entire body: " + docCommentTree.getFullBody());
System.out.println("Block tags: " + docCommentTree.getBlockTags());



@Override
public String getName()
return "Example";


@Override
public Set<? extends Option> getSupportedOptions()
Option[] options = new Option()
private final List<String> someOption = Arrays.asList("-overviewfile", "--overview-file", "-o");

@Override
public int getArgumentCount()
return 1;


@Override
public String getDescription()
return "an option with aliases";


@Override
public Option.Kind getKind()
return Option.Kind.STANDARD;


@Override
public List<String> getNames()
return someOption;


@Override
public String getParameters()
return "file";


@Override
public boolean process(String opt, List<String> arguments)
overviewFile = arguments.get(0);
return true;

;
return new HashSet<>(Arrays.asList(options));


@Override
public SourceVersion getSupportedSourceVersion()
return SourceVersion.latest();


@Override
public boolean run(DocletEnvironment docEnv)
reporter.print(Kind.NOTE, "overviewfile: " + overviewFile);
// get the DocTrees utility class to access document comments
DocTrees docTrees = docEnv.getDocTrees();

// location of an element in the same directory as overview.html
try
Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next();
DocCommentTree docCommentTree = docTrees.getDocCommentTree(e, overviewFile);
if (docCommentTree != null)
System.out.println("Overview html: " + docCommentTree.getFullBody());

catch (IOException missing)
reporter.print(Kind.ERROR, "No overview.html found.");


for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements()))
System.out.println(t.getKind() + ":" + t);
for (javax.lang.model.element.Element e : t.getEnclosedElements())
printElement(docTrees, e);


return true;











share|improve this question
























  • Have you compiled the class?

    – JB Nizet
    Mar 25 at 11:24











  • @JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

    – George Z.
    Mar 25 at 11:25













2












2








2


1






I want to experiment with Doclets (JDK 9), so i tried everything step by step given in this link. I have not add anything custom in Example class. It is exactly as Oracle gives it (I just added the imports).



Oracle gives the command:



javadoc -doclet Example 
-overviewfile overview.html
-sourcepath source-location
source-location/Example.java


Now when i run the given javadoc command, i get the following error:




javadoc: error - Cannot find doclet class Example




I tried some variations of the command since it seems to be a problem with directors but all of my tries have failed.



I place Example.java in my Desktop folder: C:UsersGeorgeDesktop



So, in my command line I cd C:UsersGeorgeDesktop. Then javac Example.java (in case it wants it compiled).



And then, i try all the following commands, getting the same error.



javadoc -doclet Example -overviewfile overview.html -sourcepath ./ ./Example.java


.



javadoc -doclet Example -overviewfile overview.html -sourcepath "C:UsersGeorgeDesktop" "C:UsersGeorgeDesktopExample.java"


(+without quotes)



javadoc -doclet Example -overviewfile overview.html"C:UsersGeorgeDesktopExample.java"



I tried few other things found in SO, but again, nothing works. What am i missing? Should not the given example work?



Example class (in case you see something i do not):



public class Example implements Doclet 
Reporter reporter;
String overviewFile;

public static void main(String[] args)


public Example()
// TODO Auto-generated constructor stub


@Override
public void init(Locale locale, Reporter reporter)
reporter.print(Kind.NOTE, "Doclet using locale: " + locale);
this.reporter = reporter;


public void printElement(DocTrees trees, Element e)
DocCommentTree docCommentTree = trees.getDocCommentTree(e);
if (docCommentTree != null)
System.out.println("Element (" + e.getKind() + ": " + e + ") has the following comments:");
System.out.println("Entire body: " + docCommentTree.getFullBody());
System.out.println("Block tags: " + docCommentTree.getBlockTags());



@Override
public String getName()
return "Example";


@Override
public Set<? extends Option> getSupportedOptions()
Option[] options = new Option()
private final List<String> someOption = Arrays.asList("-overviewfile", "--overview-file", "-o");

@Override
public int getArgumentCount()
return 1;


@Override
public String getDescription()
return "an option with aliases";


@Override
public Option.Kind getKind()
return Option.Kind.STANDARD;


@Override
public List<String> getNames()
return someOption;


@Override
public String getParameters()
return "file";


@Override
public boolean process(String opt, List<String> arguments)
overviewFile = arguments.get(0);
return true;

;
return new HashSet<>(Arrays.asList(options));


@Override
public SourceVersion getSupportedSourceVersion()
return SourceVersion.latest();


@Override
public boolean run(DocletEnvironment docEnv)
reporter.print(Kind.NOTE, "overviewfile: " + overviewFile);
// get the DocTrees utility class to access document comments
DocTrees docTrees = docEnv.getDocTrees();

// location of an element in the same directory as overview.html
try
Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next();
DocCommentTree docCommentTree = docTrees.getDocCommentTree(e, overviewFile);
if (docCommentTree != null)
System.out.println("Overview html: " + docCommentTree.getFullBody());

catch (IOException missing)
reporter.print(Kind.ERROR, "No overview.html found.");


for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements()))
System.out.println(t.getKind() + ":" + t);
for (javax.lang.model.element.Element e : t.getEnclosedElements())
printElement(docTrees, e);


return true;











share|improve this question
















I want to experiment with Doclets (JDK 9), so i tried everything step by step given in this link. I have not add anything custom in Example class. It is exactly as Oracle gives it (I just added the imports).



Oracle gives the command:



javadoc -doclet Example 
-overviewfile overview.html
-sourcepath source-location
source-location/Example.java


Now when i run the given javadoc command, i get the following error:




javadoc: error - Cannot find doclet class Example




I tried some variations of the command since it seems to be a problem with directors but all of my tries have failed.



I place Example.java in my Desktop folder: C:UsersGeorgeDesktop



So, in my command line I cd C:UsersGeorgeDesktop. Then javac Example.java (in case it wants it compiled).



And then, i try all the following commands, getting the same error.



javadoc -doclet Example -overviewfile overview.html -sourcepath ./ ./Example.java


.



javadoc -doclet Example -overviewfile overview.html -sourcepath "C:UsersGeorgeDesktop" "C:UsersGeorgeDesktopExample.java"


(+without quotes)



javadoc -doclet Example -overviewfile overview.html"C:UsersGeorgeDesktopExample.java"



I tried few other things found in SO, but again, nothing works. What am i missing? Should not the given example work?



Example class (in case you see something i do not):



public class Example implements Doclet 
Reporter reporter;
String overviewFile;

public static void main(String[] args)


public Example()
// TODO Auto-generated constructor stub


@Override
public void init(Locale locale, Reporter reporter)
reporter.print(Kind.NOTE, "Doclet using locale: " + locale);
this.reporter = reporter;


public void printElement(DocTrees trees, Element e)
DocCommentTree docCommentTree = trees.getDocCommentTree(e);
if (docCommentTree != null)
System.out.println("Element (" + e.getKind() + ": " + e + ") has the following comments:");
System.out.println("Entire body: " + docCommentTree.getFullBody());
System.out.println("Block tags: " + docCommentTree.getBlockTags());



@Override
public String getName()
return "Example";


@Override
public Set<? extends Option> getSupportedOptions()
Option[] options = new Option()
private final List<String> someOption = Arrays.asList("-overviewfile", "--overview-file", "-o");

@Override
public int getArgumentCount()
return 1;


@Override
public String getDescription()
return "an option with aliases";


@Override
public Option.Kind getKind()
return Option.Kind.STANDARD;


@Override
public List<String> getNames()
return someOption;


@Override
public String getParameters()
return "file";


@Override
public boolean process(String opt, List<String> arguments)
overviewFile = arguments.get(0);
return true;

;
return new HashSet<>(Arrays.asList(options));


@Override
public SourceVersion getSupportedSourceVersion()
return SourceVersion.latest();


@Override
public boolean run(DocletEnvironment docEnv)
reporter.print(Kind.NOTE, "overviewfile: " + overviewFile);
// get the DocTrees utility class to access document comments
DocTrees docTrees = docEnv.getDocTrees();

// location of an element in the same directory as overview.html
try
Element e = ElementFilter.typesIn(docEnv.getSpecifiedElements()).iterator().next();
DocCommentTree docCommentTree = docTrees.getDocCommentTree(e, overviewFile);
if (docCommentTree != null)
System.out.println("Overview html: " + docCommentTree.getFullBody());

catch (IOException missing)
reporter.print(Kind.ERROR, "No overview.html found.");


for (TypeElement t : ElementFilter.typesIn(docEnv.getIncludedElements()))
System.out.println(t.getKind() + ":" + t);
for (javax.lang.model.element.Element e : t.getEnclosedElements())
printElement(docTrees, e);


return true;








java javadoc java-9 doclet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 16:24







George Z.

















asked Mar 25 at 11:22









George Z.George Z.

1,5981 gold badge5 silver badges15 bronze badges




1,5981 gold badge5 silver badges15 bronze badges












  • Have you compiled the class?

    – JB Nizet
    Mar 25 at 11:24











  • @JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

    – George Z.
    Mar 25 at 11:25

















  • Have you compiled the class?

    – JB Nizet
    Mar 25 at 11:24











  • @JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

    – George Z.
    Mar 25 at 11:25
















Have you compiled the class?

– JB Nizet
Mar 25 at 11:24





Have you compiled the class?

– JB Nizet
Mar 25 at 11:24













@JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

– George Z.
Mar 25 at 11:25





@JBNizet Oracle in the article, says nothing about compile. However, from another SO post i saw that, and yea, i did. Still the same.

– George Z.
Mar 25 at 11:25












1 Answer
1






active

oldest

votes


















1














Running javadoc --help reveals the following option:



-docletpath <path>
Specify where to find doclet class files


Use that option, and it should work fine (provided you compiled the Example class and it is indeed located in the directory passed as argument to this option).






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55336696%2fcannot-run-doclet-class-given-by-oracle%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Running javadoc --help reveals the following option:



    -docletpath <path>
    Specify where to find doclet class files


    Use that option, and it should work fine (provided you compiled the Example class and it is indeed located in the directory passed as argument to this option).






    share|improve this answer



























      1














      Running javadoc --help reveals the following option:



      -docletpath <path>
      Specify where to find doclet class files


      Use that option, and it should work fine (provided you compiled the Example class and it is indeed located in the directory passed as argument to this option).






      share|improve this answer

























        1












        1








        1







        Running javadoc --help reveals the following option:



        -docletpath <path>
        Specify where to find doclet class files


        Use that option, and it should work fine (provided you compiled the Example class and it is indeed located in the directory passed as argument to this option).






        share|improve this answer













        Running javadoc --help reveals the following option:



        -docletpath <path>
        Specify where to find doclet class files


        Use that option, and it should work fine (provided you compiled the Example class and it is indeed located in the directory passed as argument to this option).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 25 at 11:34









        JB NizetJB Nizet

        558k63 gold badges922 silver badges1036 bronze badges




        558k63 gold badges922 silver badges1036 bronze badges





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55336696%2fcannot-run-doclet-class-given-by-oracle%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현