|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
For JDK7 the following code
public class Test {
public static void main(String[] args) {
new java.awt.event.MouseEvent(new javax.swing.JButton(), 0, 0, 0, 0,0,0,true, 0);
}
}
if executed with -Djava.awt.headless=true
will throw something like:
Exception in thread "main" java.lang.ExceptionInInitializerError
at Test.main(Test.java:4)
Caused by: java.awt.HeadlessException
at java.awt.MouseInfo.getNumberOfButtons(MouseInfo.java:122)
at java.awt.event.MouseEvent.<clinit>(MouseEvent.java:420)
... 1 more
|