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

Interrupted thread can't load classes from classes directory (sol)

    Details

    • Subcomponent:
    • Resolved In Build:
      b71
    • CPU:
      x86, sparc
    • OS:
      generic, solaris_7, solaris_8, windows_nt
    • Verification:
      Verified

      Description

      It is important to note that this program only fails on
      internal builds that don't have images made. If you have made
      images, then it works. I assume that if one includes classes of
      their own not in a jar, then maybe they can't load their classes
      if the thread is interrupted...

      import java.nio.channels.*;

      public class Blah {
          public static void main(String[] args) throws Exception {
              Thread.currentThread().interrupt();
              SocketChannel.open().close(); // Any class not yet loaded
          }
      }

      /export/mantis> /export/cache1/build/solaris-sparc/bin/java Blah
      Exception in thread "main" java.lang.NoClassDefFoundError: java/nio/channels/SocketChannel
              at Blah.main(Blah.java:6)

      This bug has been present for several years.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psoper Pete Soper (Inactive)
                Reporter:
                mmcclosksunw Michael Mccloskey (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: