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

System.err cannot print ThreadDeath

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      in the following code, e.printStackTrace() does nothing on Solaris but it works on Windows XP.

      class Death {
      public static void main(String[] args) throws Throwable{
      Thread t = new Thread() {
      public void run() {
                                  try {
                                      while(true);
                                  }catch(ThreadDeath e) {
      e.printStackTrace();
      System.out.println(e);
      throw e;
                                  }finally {
      System.out.println("finally reached");
                                  }
      }
      };
                      t.start();
      Thread.sleep(2000);
      System.out.println("state " + t.getState() + "\tisAlive " + t.isAlive());
      t.stop();
      System.out.println("state " + t.getState() + "\tisAlive " + t.isAlive());
      Thread.sleep(2000);
      System.out.println("2sec later state " + t.getState() + "\tisAlive " + t.isAlive());
      }
      }

      ###@###.### 2005-07-13 04:28:52 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psoper Pete Soper (Inactive)
                Reporter:
                mleisunw Mike Lei (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: