Assistive technology not found AWTError
$ 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
.
Solution 1:
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
Solution 2:
Read the following thread. I managed to escape this problem by uninstalling OpenJDK 8 headless and installing OpenJDK 8.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=798794
Commands I ran:
sudo dpkg -l | grep openjdk
This is to verify you are actually running the headless version of JAVA, so no graph library available.
sudo apt-get remove openjdk-8-jre-headless
This is to remove headless version.
sudo apt-get install openjdk-8-jre
This is to install non-headless version of java.