Java 11 and Ubuntu Assistive technology not found AWTError
While running a Java program on gnome - Ubuntu 18.04 and Linux Mint 19 (program working fine on Windows and Linux Mint 17) I faced the following error:
java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
The error was raised of this piece of code:
import java.awt.Robot
Robot r = new Robot();
The solution seems quite easy for Ubuntu/Linux Mint/gnome:
Java 11
- Edit file - /etc/java-11-openjdk/accessibility.properties
- Comment line - #assistive_technologies=org.GNOME.Accessibility.AtkWrapper
For Java 10:
/etc/java-10-openjdk/accessibility.properties
For Java 9:
/etc/java-9-openjdk/accessibility.properties
For Java 8:
/etc/java-8-openjdk/accessibility.properties
This can be done with script by:
sudo sed -i "s/^assistive_technologies=/#&/" \
/etc/java-11-openjdk/accessibility.properties
Source: