0

因此,如标题中所述,我想在 Fedora 上启动 Karel the Robot,我安装了 openjdk 包并尝试了我发现的所有内容,但没有成功。遗憾的是,总的来说,我是 Linux 的初学者,所以如果你知道该怎么做,请带我看这里。

错误是:

@fedora Downloads]$ java -jar karel.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.11.0.9-4.fc34.x86_64/lib/libawt_xawt.so
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
    at java.base/java.lang.Runtime.load0(Runtime.java:768)
    at java.base/java.lang.System.load(System.java:1837)
    at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
    at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
    at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
    at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
    at java.base/java.lang.System.loadLibrary(System.java:1873)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429)
    at java.desktop/java.awt.Font.<clinit>(Font.java:260)
    at b.y.<clinit>(Unknown Source)
    at MainKt.main(Unknown Source)
4

2 回答 2

0

这个 Fedora 论坛帖子似乎解释了如何解决您的问题

于 2021-08-05T08:56:17.073 回答
0

Fedora 34 示例,带有当代版本的 karel,https://github.com/f7g/karel-release

$ git clone https://github.com/f7g/karel-release.git
$ cd karel-release/
$ java -jar karel.jar     ## The karel GUI opens

可用的 jdk 版本没有问题,openjdk version "1.8.0_292"或者openjdk version "11.0.11+9"openjdk version "16.0.1+9"


于 2021-08-05T11:05:54.450 回答