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

KeyStroke.getKeyStrokeXXX(...) methods throw UnsatisfiedLinkError

XMLWordPrintable

    • sparc
    • solaris_2.6



      Name: nkR10003 Date: 10/17/2000


      KeyStroke.getKeyStrokeXXX(...) methods (see list below), throws unexpected
      java.lang.UnsatisfiedLinkError exception.

      Methods list:
          public static KeyStroke getKeyStrokeForEvent(KeyEvent anEvent)
          public static KeyStroke getKeyStroke(String s)
          public static KeyStroke getKeyStroke(char keyChar)
          public static KeyStroke getKeyStroke(Character keyChar, int modifiers)
          public static KeyStroke getKeyStroke(int keyCode, int modifiers,
                                                           boolean onKeyRelease)
          public static KeyStroke getKeyStroke(int keyCode, int modifiers)

      Example below demonstrates this problem:
      ------------------example--------------------
      import javax.swing.*;
      public class test {
          public static void main(String[] args) {
                 System.out.println(KeyStroke.getKeyStroke('c'));
                 System.out.println("Finish");
          }
      }
      ----------------output:----------------------
      Exception in thread "main" java.lang.UnsatisfiedLinkError: allocateNewInstance
              at java.awt.AWTKeyStroke.allocateNewInstance(Native Method)
              at java.awt.AWTKeyStroke.registerSubclass(AWTKeyStroke.java:139)
              at javax.swing.KeyStroke.getKeyStroke(KeyStroke.java:71)
              at test.main(test.java:4)
      ---------------------------------------------
      ======================================================================

            hgajewsksunw Hania Gajewska (Inactive)
            knasunw Kna Kna (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: