Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc: error - Cannot find doclet class

Tags:

javadoc

I'm trying to run Javadoc with a custom doclet from windows command line:

javadoc -classpath C:\path\to\build\dir -sourcepath C:\path\to\src\dir -doclet somePackageName.customDocletClassFileName anotherPackageName

"anotherPackageName" is the package directly under given sourcepath for which I want to produce documentation.

When I execute it like this I get the error:

javadoc: error - Cannot find doclet class somePackageName.customDocletClassFileName 

It seems like there is something wrong with the -classpath flag, any ideas?

If I substitute

-doclet somePackageName.customDocletClassFileName

to

-docletpath somePackageName

it works better (although I cannot really verify the output since I have not added the testng jar to the classpath and then there's a lot of other issues).

like image 236
PistolPete Avatar asked Jun 10 '13 09:06

PistolPete


1 Answers

SOLUTION:

-classpath is not used for finding doclets, instead -docletpath should be used, i.e:

javadoc -classpath C:\path\to\build\dir -docletpath C:\path\to\build\dir -sourcepath C:\path\to\src\dir -doclet somePackageName.customDocletClassFileName anotherPackageName

(Thanks to a colleague)

like image 168
PistolPete Avatar answered Jan 03 '23 12:01

PistolPete