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

Robot throws java.lang.IllegalArgumentException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • client-libs
    • sparc
    • solaris_9

      Please see bug 5055861... (use the sample code provided in this bug)

      platform: win 2000;
      locale: english;
      enable russian keyboard layout;
      java: 1.5.0-beta b51

      After compiling and runing the sample code once, it often becomes imposible to re-run the code w/o recompiling it again. Java throws the following exeption when re-runing the code:

      Exception in thread "main" java.lang.IllegalArgumentException: Invalid key code
              at sun.awt.windows.WRobotPeer.keyPress(Native Method)
              at java.awt.Robot.keyPress(Unknown Source)
              at KeyTest.performTest(KeyTest.java:88)
              at KeyTest.<init>(KeyTest.java:30)
              at KeyTest.main(KeyTest.java:34)

      I.e. javac KeyTest.java
      java KeyTest
      java KeyTest (repeat a few times)

            ant Anton Tarasov (Inactive)
            dvolodarsunw Dina Volodarskaya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: