由于出现“找不到辅助技术”错误而无法运行Java应用程序(如logisim)


9

我尝试了,错误是:

Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper
at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472)
at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613)
at java.desktop/javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:660)
at com.cburch.logisim.gui.start.Startup.parseArgs(Startup.java:250)
at com.cburch.logisim.Main.main(Main.java:32)

错误似乎是...

造成原因:java.lang / ClassNotFoundException:java.base / jdk.internal.loader.BuiltinClassLoader.loadClass(java.base / jdk.internal.loader.ClassLoaders $)上的org.GNOME.Accessibility.AtkWrapper AppClassLoader.loadClass(ClassLoaders.java:190)在java.base / java.lang.ClassLoader.loadClass(ClassLoader.java:499)
在java.base / java.lang.Class.forName0(本机方法)
在java.base /
java.desktop / java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485)上的java.lang.Class.forName(Class.java:374 )
...还有14个

apt-cache策略的逻辑输出logsimim

logisim:
  Installed: 2.7.1~dfsg-1
  Candidate: 2.7.1~dfsg-1
  Version table:
 *** 2.7.1~dfsg-1 500
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://in.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status
N: Unable to locate package logicsim

输出用于update-java-alternatives -l

java-1.11.0-openjdk-amd64      1101       /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64

1
您的Ubuntu版本是什么?我们如何重现您的问题?
N0rbert

@ N0bert这是最新版本。我只是用:[sudo apt-get install logicsim]安装应用程序,当我尝试启动它时,我得到了错误。
WISERDIVISOR

请添加apt-cache policy logicsim logisim和输出update-java-alternatives -l到问题。
N0rbert

通过禁用辅助技术解决的问题。请参阅下面的答案。
N0rbert

Answers:


11

我可以在干净的Ubuntu 18.04 LTS上确认您的问题。
所以我 向启动板报告了错误1788267(当前被标记为错误1788250的重复,并且在Debian中也以错误900912的形式存在)。

真是令人难以置信-许多Java应用程序被破坏并显示相同的错误java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper

更新20180913 - 错误是固定的。不需要以下步骤(它们已包含在更新的软件包中)。


但是我们可以通过禁用内部的辅助技术来解决此问题/etc/java-11-openjdk/accessibility.properties

sudo sed -i "s/^assistive_technologies=/#&/" \
/etc/java-11-openjdk/accessibility.properties

和/或内部 /etc/java-8-openjdk/accessibility.properties

sudo sed -i "s/^assistive_technologies=/#&/" \
/etc/java-8-openjdk/accessibility.properties
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.