Issue
I have a batch file that creates Javadoc for me but I am getting this error: javadoc: error - No source files for package [package name]. The part of the batch file for the doc just provides a -sourcepath
, a -classpath
and a -subpackages
argument. However, if I try to create my Javadoc with Eclipse (file -> export -> javadoc) it works perfectly fine without any errors. Anyone here knows how Eclipse generates Javadoc so I can implement it into my batch file?
Solution
To get the arguments that are used by Eclipse:
- Create a batch file containing
echo %1 > "C:\path\to\javadoc_arg.txt"
- In the Javadoc export wizard choose this batch file instead of the
javadoc.exe
and generate the Javadoc
This will create a javadoc_arg.txt
file that contains the file path of a javadoc-arguments<number>.tmp
file containing all the arguments for javadoc.exe
used by Eclipse.
Answered By - howlger
Answer Checked By - Katrina (JavaFixing Volunteer)