I'm using the Javadoc tool to document some code, and the results uses fully qualified names for system classes, such as java.lang.String
. Is there a way to stop that specifically for classes in the java.*
and javax.*
heirarchy?
For example, a method definition like this:
* @param field String to write.
* @throws IOException If the underlying stream throws an exception.
*/
public void writeField( String field ) throws IOException {
// etc.
Produces Javadoc output like this:
writeField
public void writeField(java.lang.String field) throws java.io.IOException
...etc.
Parameters:
field - String to write.
Throws:
java.io.IOException - If the underlying stream throws an exception.
I'd like the reference to java.lang.String
to be just String
, and the reference to java.io.IOException
likewise to be just IOException
.
Any ideas?
Edit and update re. the accepted answer below:
In NetBeans 10, what I did to fix this was go to the Project view, then switch to Files view. Then in the project files, locate nbproject/project.properties
and open that file (right click, choose open).
In the properties view, scroll down on the left until you see javadoc.additionalparam
. Then add the following to the right side of that property (in my case its value was empty) -link https://docs.oracle.com/en/java/javase/11/docs/api/
Then save (control-S) the file and build. The Javadocs now look how I wanted. Thank you Slaw!