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

Run into Ubuntu OS - Illegal reflective access error #12

Open
MoonDragon-MD opened this issue Mar 5, 2022 · 7 comments
Open

Run into Ubuntu OS - Illegal reflective access error #12

MoonDragon-MD opened this issue Mar 5, 2022 · 7 comments

Comments

@MoonDragon-MD
Copy link

Hi, I wanted to try this game on Ubuntu Linux but I am getting these errors
java -jar PepperCarrotEndlessRunner_v0-1alpha_for-desktop.jar

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.lwjgl.LWJGLUtil$3 (file:/mnt/ffd3/md/Program/PepperCarrot/PepperCarrotEndlessRunner_v0-1alpha_for-desktop.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.lwjgl.LWJGLUtil$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

How can I fix it?

@remram44
Copy link

remram44 commented Mar 5, 2022

Looks like you have to update lwgjl

@MoonDragon-MD
Copy link
Author

I have ubuntu 20.04 LTS I have not made any changes to java, in my package manager there is no lwgjl. Where should I look, thanks

@Deevad
Copy link
Contributor

Deevad commented Mar 7, 2022

Hi @MoonDragon-MD , (hi RemRam!)

I can also reproduce the issue on Kubuntu 20.04 LTS with the package I host here https://www.davidrevoy.com/article607/endless-runner-game-by-winterlicht , the output is not 100% similar, but it sounds related:

 ~ »»» java -jar PepperCarrotEndlessRunner_v0-1alpha_for-desktop.jar 
LwjglApplication: Couldn't initialize audio, disabling audio
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: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 org.lwjgl.LinuxSysImplementation.<clinit>(LinuxSysImplementation.java:50)
        at org.lwjgl.Sys.createImplementation(Sys.java:131)
        at org.lwjgl.Sys.<clinit>(Sys.java:116)
        at org.lwjgl.openal.AL.<clinit>(AL.java:59)
        at com.badlogic.gdx.backends.lwjgl.audio.OpenALAudio.<init>(OpenALAudio.java:72)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:86)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:67)
        at com.peppercarrot.runninggame.desktop.DesktopLauncher.main(DesktopLauncher.java:15)
Exception in thread "LWJGL Application" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
        at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:555)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:122)
 ~ »»» 

Unfortunately, I have 0 knowledge in Java, so after browsing for 20min pages explaining tips I had even no idea how to apply, I abandonned.

@MoonDragon-MD
Copy link
Author

MoonDragon-MD commented Mar 8, 2022

I managed to get it to work with java 8, now I'll explain: first of all open the terminal and write to us
java -version
It should give you such a result:

openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Then open the synaptic package manager, if you don't have it, install it
With the search function, try to see if you have the following packages:
openjdk-8-jre
openjdk-8-jre-headless
If you don't have them, install them, then from the terminal you move with cd to the game folder and give
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar PepperCarrotEndlessRunner_v0-1alpha_for-desktop.jar
Here it works for me ;) (I use the space bar to jump and the letter v for the broom)
Maybe you might be missing some other addiction, but I have no idea, I did some tests, I hope it can be useful to others too !! good job
PS: David congratulations on your drawings, I really appreciate them

@Deevad
Copy link
Contributor

Deevad commented Mar 8, 2022

Oh, good job @MoonDragon-MD ! I was able to run it.

I installed :

sudo apt install openjdk-8-jdk

Then I setup java default environment (to ensure to continue to use 11 as default after the install of 8)

sudo update-alternatives --config java

Then I could also manually launch the game

/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar PepperCarrotEndlessRunner_v0-1alpha_for-desktop.jar

I'll add these lines to my blog post.

(and thanks for your nice words about my drawings! And in case you refer to the artwork in-game; I have no credits for them; all artworks on this game are the beautiful work of WinterLicht ). 👍

@MoonDragon-MD
Copy link
Author

I'm glad to have helped start the game in the Gnu/Linux environment :)
Compliments are for your drawings and the great work on the Pepper&Carrot comic, I've been following the story for a long time and it feels like being a bit of a child again ;)
I wish you good things for the future!
Thanks, bye

@Deevad
Copy link
Contributor

Deevad commented Mar 9, 2022

Aww... Many thanks! 😻

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

3 participants