Whenever I try to generate a JavaDoc in Intellij (Tools -> Generate JavaDoc), leave the settings on default (output directory is my documents folder) I get the following error:
/home/John/apps/java/bin/javadoc -protected -splitindex -d /home/John/Dokumente @/tmp/javadoc_args
javadoc: error - invalid flag: --source-path
Usage: javadoc [options] [packagenames] [sourcefiles] [@files]
[...]
"javadoc" finished with exit code 1
My JavaDoc Code:
/**
* @author John
*
* Dialog for test.java in Administration -> Anwendung
* Set affected timespan, employee and testflag.
* Confirm via Buttonpress
*
*/
Intellij IDEA runs Javadoc from your project SDK. If your project SDK is Java 8, the --source-path
option is not supported, because this alternative spelling has been introduced with Java 9.
/tmp/javadoc_args
is the options file generated by Intellij IDEA for your Javadoc run. In the "Run" dialog that lists the Javadoc command, the @/tmp/javadoc_args
part should be a link that when clicked shows you the generated options in IDEA.
For me with Intellij IDEA 2021.2.3 Ultimate, the generated Javadoc options file does not use the --source-path
option but lists each source file path separately. I think the reason for that is that I use a custom Scope for specifying the source files to document.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.