Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenJDK missing libawt_xawt.so #19

Open
DuncanLithgow opened this issue Aug 9, 2023 · 5 comments
Open

OpenJDK missing libawt_xawt.so #19

DuncanLithgow opened this issue Aug 9, 2023 · 5 comments

Comments

@DuncanLithgow
Copy link

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.

@charxie
Copy link
Collaborator

charxie commented Aug 30, 2023

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

@DuncanLithgow
Copy link
Author

DuncanLithgow commented Oct 3, 2023

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
Copy link
Author

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."

@charxie
Copy link
Collaborator

charxie commented Oct 3, 2023

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.

@DuncanLithgow
Copy link
Author

DuncanLithgow commented Oct 4, 2023

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants