Hi,
I’m setting my first steps into multiplayer game development. At this moment I have a game client and game server running.
The server is running in a docker container, and I start the server without jme, so no class that extends from SimpleApplication
.
This means that for example the extraction of native libraries isn’t included when starting the application.
I added this command in docker before starting the application:
java -cp jme3-core-3.2.2-stable.jar:jme3-desktop-3.2.2-stable.jar:jme3-bullet-native-3.2.2-stable.jar com.jme3.system.ExtractNativeLibraries Linux64 ../bin
And I see that indeed the libbulletjme.so
file is extracted in the bin folder, next to the 2 startup scripts generated by gradle.
However, when I am starting the server, I get this error::
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.jme3.bullet.PhysicsSpace.createPhysicsSpace(FFFFFFIZ)J
at com.jme3.bullet.PhysicsSpace.createPhysicsSpace(Native Method)
at com.jme3.bullet.PhysicsSpace.create(PhysicsSpace.java:243)
at com.jme3.bullet.PhysicsSpace.<init>(PhysicsSpace.java:236)
at org.chimpstack.jme3.es.bullet.BulletSystem.initialize(BulletSystem.java:104)
at com.simsilica.sim.AbstractGameSystem.initialize(AbstractGameSystem.java:75)
at com.simsilica.sim.GameSystemManager.initialize(GameSystemManager.java:114)
at org.chimpstack.wof.server.GameServer.<init>(GameServer.java:96)
at org.chimpstack.wof.server.Main.main(Main.java:50)
both jme3-bullet
and jme3-bullet-native
are on the classpath. Am I missing some other native libraries? Are the native files in the correct directory?
for completeness the folder structure of the unpacked .tar file generated by the gradle build task:
wof-server
. bin
… wof-server
… wof-server.bat
… libbulletjme.so
. lib
… skipped other libraries
… jme3-bullet-3.2.2-stable.jar
… jme3-bullet-native-3.2.2-stable.jar
… jme3-core-3.2.2-stable.jar
… jme3-desktop-3.2.2-stable.jar
… jme3-es-bullet-0.1.0.jar
… jme3-networking-3.2.1-stable.jar
… jme3-terrain-3.2.2-stable.jar
The command is launched inside the bin
directory, the bin directory is the working dir.
I tried:
- setting the LD_LIBRARY_PATH="/app/wof-server/bin" variable
- adding -Djava.library.path="/app/wof-server/bin" to the startup script
still no luck