RFR: 8152818: Javadoc must support module options supported by javac.

Martin Buchholz martinrb at google.com
Sat Apr 16 22:45:46 UTC 2016


Here's a variant where I try adding -modulesearchpath pointing at the
jdk sources.

It fails with the error

java/util/PriorityQueue.java:26: error: unnamed package is not allowed
in named modules
package java.util;
^

... but that's nonsensical - this is not an unnamed package.  That's
the package statement right there!
Seems like a BUG.

#!/bin/bash
set -eu
JDKSRC=/home/martin/ws/jdk9-dev
JDK=$JDKSRC/build/linux-x86_64-normal-server-release/images/jdk
DIR=bug2
rm -rf $DIR
cvs -Q -d ':pserver:anonymous:@gee.cs.oswego.edu/home/jsr166/jsr166'
checkout -d $DIR jsr166/src/main
cd $DIR

find -name '*.java' |
xargs perl -0777 -pi -e 's~sun\.(reflect|misc)~jdk.internal.$1~g'

exec $JDK/bin/javadoc \
  -d docs \
  -Xdoclint:all \
  -Xmodule:java.base \
  -modulesourcepath "$JDKSRC/jdk/src/java.base/share/classes" \
  -Xdocrootparent http://docs.oracle.com/javase/9/docs \
  -tag 'jls:a:See <cite> The Java™ Language Specification</cite>:' \
  -tag 'implSpec:a:Implementation Requirements:' \
  -tag 'implNote:a:Implementation Note:' \
  $(find java -name '*.java')


More information about the javadoc-dev mailing list