javadoc @options
I'm trying to generate javadoc for the given source while inheriting
apidoc from the base class/interface which happens to be from the
standard Java library.
I have the following "options" file (I'm on Windows for what is worth):
net.example
-d
doc
-sourcepath
src;C:\java\jdk-11\src
-link
https://docs.oracle.com/en/java/javase/11/docs/api
I have extracted the "src.zip" in the "C:\java\jdk-11" installation to a "src" subdirectory just for that purpose.
I'm executing:
javadoc @options
but I'm not getting the generated javadoc inheriting apidoc from the jdk sources.
The same example using Java 8 javadoc, and options:
net.example
-d
doc
-sourcepath
src;C:\java\jdk1.8.0\src
-link
https://docs.oracle.com/javase/8/docs/api
works as expected. What configuration I need to use to make the same working with Java 11's javadoc?
On 10/2/2021 3:18 PM, Stanimir Stamenkov wrote:
I'm trying to generate javadoc for the given source while inheriting
apidoc from the base class/interface which happens to be from the
standard Java library.
I have the following "options" file (I'm on Windows for what is worth):
net.example
-d
doc
-sourcepath
src;C:\java\jdk-11\src
-link
https://docs.oracle.com/en/java/javase/11/docs/api
I have extracted the "src.zip" in the "C:\java\jdk-11" installation to
a "src" subdirectory just for that purpose.
I'm executing:
javadoc @options
but I'm not getting the generated javadoc inheriting apidoc from the
jdk sources.
The same example using Java 8 javadoc, and options:
net.example
-d
doc
-sourcepath
src;C:\java\jdk1.8.0\src
-link
https://docs.oracle.com/javase/8/docs/api
works as expected. What configuration I need to use to make the same
working with Java 11's javadoc?
I suspect that you may need to add the module name to the source
path for Java 11:
-sourcepath
src;C:\java\jdk-11\src\java.desktop
javadoc @optionsLoading source files for package net.example...
javac -d classes src\net\example\FooOp.java
javadoc @optionsLoading source files for package net.example...
I'll further try adding a module descriptor for my source, though my
goal is dealing with unnamed module sources.
xcopy /s /i src src-modules\net.example
src-modules/^
net.nexample/
module-info.java
net/example/
FooOp.java
then having javadoc @options:
--module
net.example
-d
doc
--module-source-path
src-module;C:\java\jdk-11\src
-link
https://docs.oracle.com/en/java/javase/11/docs/api
but I'm getting lots of errors related to java.base classes:
Constructing Javadoc information... C:\java\jdk-11\src\java.base\jdk\internal\access\SharedSecrets.java:28: error: package javax.crypto does not exist
import javax.crypto.SealedObject;
^ C:\java\jdk-11\src\java.base\jdk\internal\access\JavaxCryptoSealedObjectAccess.java:27:
error: package javax.crypto does not exist
import javax.crypto.BadPaddingException;
^
...
and finally no doc produced.
Has anyone successfully generated javadoc with inherited doc from base
Java 11 classes?
Sun, 3 Oct 2021 13:30:55 +0300, /Stanimir Stamenkov/:
src-modules/^
net.nexample/
module-info.java
net/example/
FooOp.java
then having javadoc @options:
--module
net.example
-d
doc
--module-source-path
src-module;C:\java\jdk-11\src
src-modules (same outcome, anyway)
-link
https://docs.oracle.com/en/java/javase/11/docs/api
but I'm getting lots of errors related to java.base classes:
Constructing Javadoc information...
C:\java\jdk-11\src\java.base\jdk\internal\access\SharedSecrets.java:28: error:
package javax.crypto does not exist
import javax.crypto.SealedObject;
^
C:\java\jdk-11\src\java.base\jdk\internal\access\JavaxCryptoSealedObjectAccess.java:27:
error: package javax.crypto does not exist
import javax.crypto.BadPaddingException;
^
...
and finally no doc produced.
Has anyone successfully generated javadoc with inherited doc from base
Java 11 classes?
O.k. I've been able to generate the desired result by linking C:\java\jdk-11\src\java.desktop as src-modules\java.desktop...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 286 |
Nodes: | 16 (3 / 13) |
Uptime: | 86:17:40 |
Calls: | 6,496 |
Calls today: | 7 |
Files: | 12,099 |
Messages: | 5,277,030 |