Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibilit


系統環境

Ubuntu 20.04 focal


問題分析

該異常出現的原因,從谷歌上可以得到答案

one of the more common causes of this exception is a missing or corrupt installation of a Java Access Bridge. In this case, the following access bridge has been defined in standard configuration file (JDK_HOME/jre/lib/accessibility.properties):

com.sun.java.accessibility.AccessBridge

But it won't actually be operative unless the required installation is complete. Note that the standard access bridge implementation does not come packages with the SDK. To fix your particular issue, download and install the Oracle Access Bridge by following instructions from their setup page. That should resolve the startup error occurring in your program.


根據上述內容,我們可以在Oracle官網下載安裝這個 Java Access Bridge解決此問題,安裝說明 setup page.

當然,也可以直接禁用掉這個assistive technology,因此,最行之有效且方便的解決方案如下(對於通過apt安裝的openjdk而言):

文件
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/accessibility.properties

注釋掉

# assistive_technologies=org.GNOME.Accessibility.AtkWrapper


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM