<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Nir,</p>
    <p>Thank you for your question.  It may be that there is a bug, or
      at least, a lack of tests, in this area.</p>
    <p>In general, you need to give text for the link, since (unlike for
      program elements) javadoc cannot infer the string for itself. Iit
      doesn't go looking for headings and ids.<br>
    </p>
    <p>You might try  `@see Chronus##time-heading my-text` or failing
      that `<a href="Chronus.html##time-heading">my-text</a></p>
    <p>For our part, we should make sure that we have tests for this
      situation and/or clarify the spec if that is needed.</p>
    <p>-- Jon<br>
    </p>
    <div class="moz-cite-prefix">On 2/15/24 9:22 AM, Nir Lisker wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CA+0ynh9mgfEH9k=8EPq-yAGkr4QYEmxKepYZDx7wSNM_OKU6Uw@mail.gmail.com">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I have a question after reading <a href="https://bugs.openjdk.org/browse/JDK-8294195" moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8294195</a>.
          If I have a class Chronus.java with a heading in its class
          javadoc:</div>
        <div><br>
        </div>
        <div><h2>Time</h2></div>
        <div><br>
        </div>
        <div>then an anchor Chronus.html#time-heading is auto-generated.
          How do I link to this anchor from within the class using @see
          and @link? I have tried<br>
          @see ##time-heading<br>
          @see Chronus.html##time-heading<br>
          @see Chronus##Chronus.html#time-heading<br>
          <br>
          None of which work. What is the correct syntax?</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Nir<br>
          <a class="gmail_plusreply" moz-do-not-send="true"><br>
          </a></div>
      </div>
    </blockquote>
  </body>
</html>