<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 6/5/24 2:51 AM, Osipov, Michael
wrote:<br>
</div>
<blockquote type="cite" cite="mid:PAVPR10MB7035701A19D9F217B471B27C8AF92@PAVPR10MB7035.EURPRD10.PROD.OUTLOOK.COM">
<pre class="moz-quote-pre" wrap="">On 2024-05-31 21:38, Jonathan Gibbons wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Michael,
There is no `element-list` file for any version of JDK before JDK 9.
Before JDK 9, the appropriate information was in the `package-list`
file. In JDK 9, with the introduction of modules, the format of the file
was updated to include modules, and because this was an incompatible
change, the file was renamed as well, to `element-list`.
It is an annoying misconfiguration of `docs.oracle.com` that you are
seeing `302 Moved Temporarily` instead of `404 Not Found` which would be
a more semantically accurate response.
That leaves the question of why whatever you were doing was looking for
`element-list` in JDK 8. To answer that, we need more info, to determine
whether it is just a command-line error on your part, or any error in
the `javadoc` tool itself. What version of JDK and javadoc are you
using; what external libraries were you referencing in `-link` or `-
linkoffline` options; and what source level were you using, with either
the `-source` or `--release` options?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
John,
thanks for the elaboration. Let me better clarify what happens.
The code is question with a modification for you is available at:
<a class="moz-txt-link-freetext" href="https://urldefense.com/v3/__https://github.com/michael-o/tomcatspnegoad/tree/javadoc-issue__;!!ACWV5N9M2RV99hQ!L6MibNz6g0M99jnVOo2O_Zs2vP8-4CM-NS4WNUmHmL5dB30i0qaSfDJBHW4S_bxjOhImERJfBWGpStJ6WrwE0WAva10xtV86PQ$">https://urldefense.com/v3/__https://github.com/michael-o/tomcatspnegoad/tree/javadoc-issue__;!!ACWV5N9M2RV99hQ!L6MibNz6g0M99jnVOo2O_Zs2vP8-4CM-NS4WNUmHmL5dB30i0qaSfDJBHW4S_bxjOhImERJfBWGpStJ6WrwE0WAva10xtV86PQ$</a>
Class net.sf.michaelo.tomcat.pac.asn1.AdIfRelevantAsn1Parser uses
com.sun.security.jgss.AuthorizationDataEntry and others use private Sun
classes which does not allow me to use -release for now, only -source.
The source is Java 8. When I run javadoc:javadoc with Zulu 8 all links
are generated successfully. Running Zulu 11 with extracted Javadoc call
(&"C:\Program Files\Zulu\zulu-11\bin\javadoc.exe" -verbose "@options"
"@packages") gives me no warning, even in verbose mode. It simply does
not link.
When trying Temurin 22.0.1 (&"C:\Temp\jdk-22.0.1+8\bin\javadoc.exe"
-verbose "@options" "@packages") it gives me:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Warnung: URL <a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec/element-list">https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec/element-list</a> wurde umgeleitet an <a class="moz-txt-link-freetext" href="https://docs.oracle.com/en/java/javase/22/">https://docs.oracle.com/en/java/javase/22/</a> - Aktualisieren Sie die Befehlszeilenoptionen, um diese Warnung zu unterdrücken.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
That is the redirect. Either I am misunderstanding or I have hit an edge
case for public classes outside of the standard JDK (Java namespaces).
Here is the input to Javadoc (@options, @packages) if you cannot try
yourself: <a class="moz-txt-link-freetext" href="https://urldefense.com/v3/__https://gist.github.com/michael-o/212c6797b000914b9142f1f077b1d9df__;!!ACWV5N9M2RV99hQ!L6MibNz6g0M99jnVOo2O_Zs2vP8-4CM-NS4WNUmHmL5dB30i0qaSfDJBHW4S_bxjOhImERJfBWGpStJ6WrwE0WAva12c46QzhA$">https://urldefense.com/v3/__https://gist.github.com/michael-o/212c6797b000914b9142f1f077b1d9df__;!!ACWV5N9M2RV99hQ!L6MibNz6g0M99jnVOo2O_Zs2vP8-4CM-NS4WNUmHmL5dB30i0qaSfDJBHW4S_bxjOhImERJfBWGpStJ6WrwE0WAva12c46QzhA$</a>
I have tried:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: C:\Entwicklung\Programme\apache-maven-3.8.8
Java version: 11.0.18, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-11
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: C:\Entwicklung\Programme\apache-maven-3.8.8
Java version: 1.8.0_362, vendor: Azul Systems, Inc., runtime: C:\Program Files\Zulu\zulu-8\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: C:\Entwicklung\Programme\apache-maven-3.8.8
Java version: 22.0.1, vendor: Eclipse Adoptium, runtime: C:\Temp\jdk-22.0.1+8
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Note: I have routed the Javadoc traffic through Fiddler and it clearly
following the misconfigured docs.oracle.com location:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap=""># Result Protocol Host URL Body Caching Content-Type Process Comments Custom
10 302 HTTPS docs.oracle.com /javase/8/docs/jre/api/security/jgss/spec/element-list 1 javadoc:24660
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
12 200 HTTPS docs.oracle.com /en/java/javase/22/ 33 431 max-age=19052 text/html javadoc:24660
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Regards,
Michael
</pre>
</blockquote>
<p><br>
</p>
<p>Michael,</p>
<p>I investigated a bit further, and I may have a solution for you.</p>
<p>The redirect is annoying, and sad to say, there is nothing I can
do to get it fixed in a timely manner. But, I think you may be
able to work around it. The answer is based on the content of the
files in the gist that you referenced in your message.</p>
<p>Look at these lines:<br>
</p>
<table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="" data-tagsearch-path="@options" style="box-sizing: border-box; border-spacing: 0px; border-collapse: collapse; tab-size: 8; caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<tbody style="box-sizing: border-box;">
<tr style="box-sizing: border-box; background-color: transparent;">
<td id="file-options-LC32" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">-link</td>
</tr>
<tr style="box-sizing: border-box;">
<td id="file-options-LC33" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">'<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec">https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec</a>'</td>
</tr>
<tr style="box-sizing: border-box; background-color: transparent;">
<td id="file-options-LC34" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">-linkoffline</td>
</tr>
<tr style="box-sizing: border-box;">
<td id="file-options-LC35" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">'<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/api">https://docs.oracle.com/javase/8/docs/api</a>' 'C:/Entwicklung/workspace-2023-06/tomcatspnegoad/tomcat90/target/javadoc-bundle-options'</td>
</tr>
<tr style="box-sizing: border-box; background-color: transparent;">
<td id="file-options-LC36" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">
</td>
</tr>
</tbody>
</table>
<p></p>
<p>I'm not sure what is in your `javadoc-bundle-options` file, but
it *ought* to be a local copy of the `package-list` found here:<br>
<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/api/package-list">https://docs.oracle.com/javase/8/docs/api/package-list</a><br>
<br>
For the first option, the `-link` one, try changing it to:<br>
</p>
<table data-hpc="" class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-lang="" data-tagsearch-path="@options">
<tbody>
<tr style="box-sizing: border-box; background-color: transparent;">
<td id="file-options-LC32" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">-linkoffline</td>
</tr>
<tr style="box-sizing: border-box;">
<td id="file-options-LC33" class="blob-code blob-code-inner js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; line-height: 20px; vertical-align: top; display: table-cell; overflow: visible; font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace); font-size: 12px; color: var(--fgColor-default, var(--color-fg-default)); overflow-wrap: anywhere; white-space: pre;">'<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec">https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec</a>' /path/to/file</td>
</tr>
</tbody>
</table>
<p>where `/path/to/file` is a local copy of the file found here:<br>
<a class="moz-txt-link-freetext" href="https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec/package-list">https://docs.oracle.com/javase/8/docs/jre/api/security/jgss/spec/package-list</a></p>
<p>which in reality is just:<br>
</p>
<pre style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; white-space: pre-wrap;">com.sun.security.jgss
</pre>
<p>In other words, both options should be instances of the
`-linkoffline` option, which should be of the form:<br>
</p>
<pre style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; white-space: pre-wrap;">-linkoffline <a class="moz-txt-link-freetext" href="https:/url/to/api">https:/url/to/api</a> /path/to/file
</pre>
<p>where `/path/to/file` is a local copy of the file downloaded from
`<span style="white-space: pre-wrap"><a class="moz-txt-link-freetext" href="https:/url/to/api/package-list">https:/url/to/api/package-list</a>`</span></p>
<p>Note I am using `.../package-list` in this message because you
are using `-source 8`. If you use a newer version of these APIs,
you may need to change `package-list` to `element-list`. (I
believe the change happened in JDK 11.)<br>
<br>
For more details on the `-linkoffline` option, see<br>
<a class="moz-txt-link-freetext" href="https://docs.oracle.com/en/java/javase/22/docs/specs/man/javadoc.html#option-linkoffline">https://docs.oracle.com/en/java/javase/22/docs/specs/man/javadoc.html#option-linkoffline</a></p>
<p><br>
</p>
<p>-- Jon<br>
</p>
</body>
</html>