Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javadoc: "package [...] does not exist" for external references without docs

Tags:

java

javadoc

I am using javadoc to generate my documentation. I have my own classes, and two external jars:

  • json simple, where I have the source and could generate javadocs
  • a proprietary library, where i have no chance to get the source or docs.

When I run the javadoc tool, I get multiple errors:

  • "package [...] does not exist" whenever I import a class of the external libraries.
  • "cannot find symbol [...]" whenever I use a class of the external libraries.

This is of course correct, as javadoc has no idea where to find sources or docs for these classes.

But, I do not want these messages to show, as I want to be able to recognize at first glance, if everything worked as intended. Right now, I have to look through hundred lines of "known errors" to find any other errors or warnings.

How can I fix or suppress the errors?

like image 596
Sadret Avatar asked Jul 13 '17 08:07

Sadret


1 Answers

I found the solution to my problem. I just needed to add the external libraries to the classpath, as described here:
Javadoc Documentation: classpath
Example: -classpath D:/folder/lib.jar

like image 148
Sadret Avatar answered Sep 20 '22 20:09

Sadret