Java 9 module : Couldn't load shared library 'libgdx64.so' for target: Linux, 64-bit
See original GitHub issueIssue details
Simply transforming the basic project template (for desktop target) into a java 9 project (with module-info.java) make the project non runnable.
Reproduction steps/code
I just added the module-info.java for project core and desktop in eclipse: Right click on project name => Configure => Create module-info.java This command will also transform the classpath entries into modulepath entries (for java9 modules).
I need java9 module because I want to extensively use services.
By the way, I think you should add the module-info.java into libgdx jars to be java9 compliant (and this shouldn’t break anything I suppose?).
LibGDX v1.9.8
Stacktrace
Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx64.so' for target: Linux, 64-bit
at gdx@1.9.8/com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:125)
at gdx@1.9.8/com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:33)
at gdx.backend.lwjgl@1.9.8/com.badlogic.gdx.backends.lwjgl.LwjglNativesLoader.load(LwjglNativesLoader.java:47)
at gdx.backend.lwjgl@1.9.8/com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:81)
at gdx.backend.lwjgl@1.9.8/com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:69)
at com.mygdxgame.desktop/com.mygdx.game.desktop.DesktopLauncher.main(DesktopLauncher.java:10)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Unable to read file for extraction: libgdx64.so
at gdx@1.9.8/com.badlogic.gdx.utils.SharedLibraryLoader.readFile(SharedLibraryLoader.java:133)
at gdx@1.9.8/com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:289)
at gdx@1.9.8/com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:121)
... 5 more
Affected platforms
- [?] Android
- [?] iOS (robovm)
- [?] iOS (MOE)
- [?] HTML/GWT
- [?] Windows
- Linux
- [?] MacOS
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Couldn't load shared library 'libgdx64.so' for target: Linux, 64-bit
I found the answer on this BitBucket repo. The README gives a nice explanation of how to implement this using Gradle.
Read more >Having some trouble with World : r/libgdx - Reddit
GdxRuntimeException: Couldn't load shared library 'libgdx-box2d64.dylib' for target: Mac OS X, 64-bit at com.badlogic.gdx.utils.
Read more >LAsso - Bountysource
So I'm playing with the XML format just to see what can be done. ... the error message Couldn't load shared library 'libgdx64.dylib'...
Read more >Couldn't load shared library 'gdx-freetype' for target: Darwin ...
I updated my moe version to latest 1.3 beta . previously my libgdx project was working fine with desktop as well as iOS...
Read more >lwjgl教程- OSCHINA - 中文开源技术交流社区
LWJGL - Lightweight Java Game Library 3 LWJGL (https://www.lwjgl.org) is a Java ... Couldn't load shared library 'libgdx64.so' for target: Linux, 64-bit at ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My workaround for this issue was to merge all of libGDX and its dependencies into a single jar and including a module descriptor in it as well. Then you just depend on this single modularized jar instead of all libGDX stuff. This is really ugly, but it avoids the downsides of automatic modules.
I’m closing this, since we’re already in the process of changing the setup tool.