Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266036

class file for sun.misc.Contended not found

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11, 16, 17
    • Fix Version/s: 17
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b31

      Backports

        Description

        Trying to compile a class that subclasses java.util.concurrent.ForkJoinPool with --release 8 causes the following error:

        > javac --release 8 -processorpath demo demo/MyPool.java
        error: cannot access Contended
          class file for sun.misc.Contended not found
        1 error

        I can confirm this happens with javac from JDK 11.0.10 and JDK 16.

        This can be reproduce with the attached demo.jar:

        jar xf demo.jar
        javac --release 8 -processorpath demo demo/MyPool.java

        As a side note, discovering which Java sources triggered this error was not straight forward as the error message does not mention it (note lack of "MyPool" in the error message).

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jlahoda Jan Lahoda
                Reporter:
                dnsimon Douglas Simon
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: