I found an app called CPU Sim and I’m interested in computer architecture and so I’ve been trying to get it to run. Whenever I fallow the readme it fails with either of these issues.
When I try running 4.0.11 with the command java -cp .:richtextfx-fat-0.6.10.jar:reactfx-2.0-MR.jar -jar CPUSim-4.0.11.jar
I get the error of: Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Container at cpusim.Main.main(Main.java:135)
and when I try 3.9.0 with the command java -cp CPUSim3.9.jar:jhall.jar:CPUSimHelp3.9.jar cpusim.Main
I get the error:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2638)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1854)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2450)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2506)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2705)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2656)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1890)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1395)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1393)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1392)
at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1425)
at java.desktop/java.awt.Component.<clinit>(Component.java:621)
at cpusim.Main.main(Main.java:110)
system info:
OS: linux mint 20.3
`java -version` output:
openjdk version "11.0.22" 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu220.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu220.04.1, mixed mode, sharing)