Eu tentei capturar imagens usando a classe Java Robot com o NetBeans, como mostrado abaixo
try {
Rectangle screen = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
BufferedImage capture = new Robot().createScreenCapture(screen);
ImageIcon icon = new ImageIcon(capture);
jLabel1.setIcon(icon);
}catch(Exception ex){
JOptionPane.showMessageDialog(null, ex);
}
e eu recebi este erro
A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0x00007f58931331d8, pid=3254, tid=0x00007f5890750700 JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11) Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops) Problematic frame: C [libawt_xawt.so+0x421d8] ReadRegionsInList+0x3b8 Core dump written. Default location: /home/sanaa/Desktop/server/RobotExample/core or core.3254
alguma ideia do que está causando o erro?
Nota : usei o mesmo código no windows-32bits / Netbeans e funciona