multiphysics icon indicating copy to clipboard operation
multiphysics copied to clipboard

OpenJDK missing libawt_xawt.so

Open DuncanLithgow opened this issue 1 year ago • 5 comments

I'm not sure who should handle this or help with this. But I can't work it out. I see nowhere a way to install missing elements to OpenJDK.

I'm running Fedora GNU/Linux 37 and have installed OpenJDK JRE and JDK

My understanding is that libawt_xawt.so is needed for drawing gui windows, so of course this graphical program won't start.

DuncanLithgow avatar Aug 09 '23 19:08 DuncanLithgow

I have no idea. Can you try to run the jar file from this website?https://intofuture.org/energy2d.html

charxie avatar Aug 30 '23 22:08 charxie

Hi Charlie. I'm using the file from that site.

Here's some more info about what is happening in Fedora 38 with OpenJDK 17

It seems it can't fnd/access /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-1.fc38.x86_64/lib/libawt_xawt.so

[... ~]$ java -jar energy2d.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-1.fc38.x86_64/lib/libawt_xawt.so at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398) at java.base/java.lang.Runtime.load0(Runtime.java:755) at java.base/java.lang.System.load(System.java:1953) at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174) at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818) at java.base/java.lang.System.loadLibrary(System.java:1989) at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1392) at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1390) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1389) at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1427) at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1401) at java.desktop/java.awt.Component.<clinit>(Component.java:624) [... ~]$

Is there any useful information there?

DuncanLithgow avatar Oct 03 '23 09:10 DuncanLithgow

Could something here be the problem? https://www.tutorialspoint.com/how-to-handle-java-lang-unsatisfiedlinkerror-in-java

"UnsatisfiedLinkError is caused by a number of factors, such as missing native libraries or library paths configured incorrectly, outdated library versions or dependencies that the native code requires."

DuncanLithgow avatar Oct 03 '23 09:10 DuncanLithgow

I currently do not have a Linux machine for testing. I am still hoping that we will eventually convert this to a Web app instead of Java, which is old.

charxie avatar Oct 03 '23 11:10 charxie

If you want to make energy2d windows/linux cross platform you could run an Ubuntu USB persistent live environment as described here https://itsfoss.com/ubuntu-persistent-live-usb/

"Linux on a stick"

DuncanLithgow avatar Oct 04 '23 11:10 DuncanLithgow