Skip to main content

7b52 can't create java.awt.Robot

1 reply [Last post]
Joined: 2007-04-29

tested 7b52 on ubuntu and got this exception (mouse is a logitech revolution):

<br />
package test;</p>
<p>import java.awt.AWTException;<br />
import java.awt.Robot;<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;</p>
<p>/* start with jdk 7b52 (tested only on linux)</p>
<p>Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: button doesn't exist 12<br />
        at java.awt.event.InputEvent.getMaskForButton(<br />
        at java.awt.Robot.(<br />
        at test.RobotTest$<br />
        at java.awt.event.InvocationEvent.dispatch(<br />
        at java.awt.EventQueue.dispatchEvent(<br />
        at java.awt.EventDispatchThread.pumpOneEventForFilters(<br />
        at java.awt.EventDispatchThread.pumpEventsForFilter(<br />
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(<br />
        at java.awt.EventDispatchThread.pumpEvents(<br />
        at java.awt.EventDispatchThread.pumpEvents(<br />
        at<br />
<p>public class RobotTest {<br />
    public static void main(String args[]) {<br />
        java.awt.EventQueue.invokeLater(new Runnable() {<br />
            public void run() {<br />
                try {<br />
                    new Robot();<br />
                } catch (AWTException ex) {<br />
                    Logger.getLogger(RobotTest.class.getName()).log(Level.SEVERE, null, ex);<br />
                }<br />
            }<br />
        });<br />
    }<br />
}<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-07-24