Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper 的问题解决

班承德
2023-12-01

前言

今天在学习Antlr4的时候遇到了这个问题,如下:

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 javax.swing.RepaintManager.<clinit>(RepaintManager.java:238)
        at javax.swing.JComponent.repaint(JComponent.java:4792)
        at java.awt.Component.repaint(Component.java:3311)
        at org.antlr.v4.gui.TreeViewer.updatePreferredSize(TreeViewer.java:129)
        at org.antlr.v4.gui.TreeViewer.setTree(TreeViewer.java:800)
        at org.antlr.v4.gui.TreeViewer.<init>(TreeViewer.java:118)
        at org.antlr.v4.gui.Trees.inspect(Trees.java:25)
        at org.antlr.v4.gui.Trees.inspect(Trees.java:32)
        at org.antlr.v4.gui.TestRig.process(TestRig.java:213)
        at org.antlr.v4.gui.TestRig.process(TestRig.java:166)
        at org.antlr.v4.gui.TestRig.main(TestRig.java:119)

在github上看到了回答,大概是
它似乎是由 openjdk 软件包的无人注意的安全升级引起的。

解决方法

通过编辑OpenJDK的accessibility.properties文件
sudo vim /etc/java-8-openjdk/accessibility.properties
注释掉下面一行
assistive_technologies=org.GNOME.Accessibility.AtkWrapper

参考:https://github.com/microsoft/vscode-arduino/issues/644

 类似资料: