best practice for including images in the javadoc headers of module descriptors

Rick Hillegas rick.hillegas at gmail.com
Sat Jan 12 17:23:34 UTC 2019


I would appreciate your advice about the best practice for handling the 
following problem.

The structure of the generated javadoc tree appears to have changed 
substantially between Java 9 and Java 11. I noticed this because my 
module descriptors include <img> tags, which pull corresponding module 
diagrams into the module overview pages generated by javadoc. The <img> 
tags have src attributes with relative file references. Here, for 
instance, is the <img> tag from the javadoc header in the Derby engine's 
module descriptor:

  * <div style="text-align:center;">

  *   <img

  *     src="resources/engine.svg"

  *     alt="module diagram for org.apache.derby.engine"

  *     border="2"

  *   />

  * </div>


When I build the javadoc using Java 9, browsers correctly display the 
module diagrams because the module overview pages are in the same 
directory as the top-level index.html. However, when I build the javadoc 
using Java 11, the module overview pages live in subdirectories of that 
top-level root--in this case, in the org.apache.derby.engine subdirectory.

What is the best practice for including images in module descriptor 
headers so that the resulting javadoc displays correctly regardless of 
whether one builds it using JDK 9 or JDK 11?

Thanks,
-Rick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20190112/70978baa/attachment.html>


More information about the javadoc-dev mailing list