Archetype defaults do not run the game

Issue #45 new
Former user created an issue

Using MacOS X Sierra, I have java jdk 8, maven etc. Avoiding IDEs to test this, I got the archetype:

mvn archetype:generate -DarchetypeGroupId=org.slick2d -DarchetypeArtifactId=slick2d-basic-game-archetype -DarchetypeVersion=1.0.0 -DgroupId=meh -DartifactId=gaem -Dversion=0.0.1-SNAPSHOT -Dpackage=meh

Installing seems to work, but the target's doesn't seem to setup the java.library.path correctly.

LamblinMBP:gaem dlamblin$ target/gaem-1.0-SNAPSHOT-release/gaem-1.0-SNAPSHOT/ 
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
    at java.lang.ClassLoader.loadLibrary(
    at java.lang.Runtime.loadLibrary0(
    at java.lang.System.loadLibrary(
    at org.lwjgl.Sys$
    at Method)
    at org.lwjgl.Sys.doLoadLibrary(
    at org.lwjgl.Sys.loadLibrary(
    at org.lwjgl.Sys.<clinit>(
    at org.lwjgl.opengl.Display.<clinit>(
    at org.newdawn.slick.AppGameContainer$
    at Method)
    at org.newdawn.slick.AppGameContainer.<clinit>(
    at meh.Game.main(
LamblinMBP:gaem dlamblin$ java -jar -Djava.library.path=target/natives target/gaem-1.0-SNAPSHOT.jar 
Error: Could not find or load main class meh.Game
LamblinMBP:gaem dlamblin$ java -jar -Djava.library.path=target/natives target/gaem-1.0-SNAPSHOT-release/gaem-1.0-SNAPSHOT/gaem-1.0-SNAPSHOT.jar 
Fri Jul 07 17:32:51 PDT 2017 ERROR:Unable to determine Slick build number
Fri Jul 07 17:32:51 PDT 2017 INFO:LWJGL Version: 2.9.3
Fri Jul 07 17:32:51 PDT 2017 INFO:OriginalDisplayMode: 1440 x 900 x 32 @0Hz
Fri Jul 07 17:32:51 PDT 2017 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz
Fri Jul 07 17:32:51 PDT 2017 INFO:Starting display 800x600
Fri Jul 07 17:32:51 PDT 2017 INFO:Use Java PNG Loader = true
Jul 07, 2017 5:32:51 PM getControllers
INFO: Loading:
Fri Jul 07 17:32:51 PDT 2017 INFO:Found 0 controllers
LamblinMBP:gaem dlamblin$ 

So the last command works:

java -jar -Djava.library.path=target/natives target/gaem-1.0-SNAPSHOT-release/gaem-1.0-SNAPSHOT/gaem-1.0-SNAPSHOT.jar

It seems to me the should be fixed or the lib should include the same natives.

Comments (0)

  1. Log in to comment