Ubuntu – Assistive technology not found AWTError

accessibilitygnomejarjavasystem-installation

$ java -jar aprof-plot.jar
Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
    at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
    at java.awt.EventQueue.invokeLater(EventQueue.java:1264)
    at aprofplot.Main.newWindow(Main.java:33)
    at aprofplot.Main.main(Main.java:359)

Possible explanations I saw here was to install Java-access-bridge. But I am unable to install libaccess-java-bridge.

Best Answer

I ran into this same error on my Ubuntu 15.10 server but did not want to install the non-headless version of OpenJDK due to the number of additional dependencies. A simpler solution was to simply disable assistive technologies.

This can be done by editing the accessibility.properties file for OpenJDK 8 (change the version to whichever is actually in use on your system):

sudo vim /etc/java-8-openjdk/accessibility.properties

Comment out the following line:

#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

Also you can edit this line programmatically:

sudo sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibility.properties
Related Question