Simsilica / SimArboreal-Editor

Editor using the SimArboreal library to generate exportable tree models.
http://simsilica.github.io/SimArboreal-Editor/
10 stars 6 forks source link

What version of LWJGL is required to build? #6

Closed simon-brooke closed 6 months ago

simon-brooke commented 6 months ago

Hi, sorry to bother you.

I understand how it feels when someone else is trying to resurrect one of your ancient projects, and pesters you with questions. But I need a Java procedural tree model generator, and SimArboreal seemed like a good place to start.

I've checked out all of

I've got all of them building with Gradle 4.4.1 on OpenJDK 17.0.10 (tried with Gradle 8.7 but too much broke). However, the editor, although it builds, breaks at runtime as follows:

simon@oculist:~/workspace/SimArboreal-Editor$ java -jar build/libs/sim-arboreal-editor-1.0.1-SNAPSHOT.jar 
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Gtk-Message: 16:46:15.378: Failed to load module "canberra-gtk-module"
Apr 19, 2024 4:46:20 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-stable
 * Branch: HEAD
 * Git Hash: af04bf9
 * Build Date: 2017-02-13
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/opengl/ARBDebugOutputCallback$Handler
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:375)
    at com.jme3.system.JmeDesktopSystem.newContextLwjgl(JmeDesktopSystem.java:199)

I couldn't deduce from the project what version of the lwjgl-opengl library you were using, but seeing you last touched this in 2017 I'm guessing it was 3.1.0, so I amended build.gradle as follows:

simon@oculist:~/workspace/SimArboreal-Editor$ git diff
diff --git a/build.gradle b/build.gradle
index ea72faf..937c774 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,6 +11,7 @@ applicationDefaultJvmArgs = ["-Xmx512m", "-XX:MaxDirectMemorySize=512m"]

 repositories {
     mavenLocal()
+    mavenCentral()^M
     jcenter()

     // Temporary until JME jars are in jcenter()   
@@ -38,6 +39,9 @@ dependencies {
     compile "org.jmonkeyengine:jme3-desktop:3.1.+" 
     compile "org.jmonkeyengine:jme3-effects:3.1.+" 
     compile "org.jmonkeyengine:jme3-lwjgl:3.1.+" 
+    ^M
+    compile "org.lwjgl:lwjgl:3.1.0"^M
+    compile "org.lwjgl:lwjgl-opengl:3.1.0"^M

     compile "com.simsilica:sim-arboreal:1.0.1-SNAPSHOT"
     runtime 'com.simsilica:sim-arboreal:1.0.1-SNAPSHOT:assets'
@@ -49,7 +53,7 @@ dependencies {

     compile "com.simsilica:pager:1.0.+"
     compile "com.simsilica:sim-fx:1.0.+"
-    runtime "com.simsilica:sim-fx:1.0.+:assets"
+    // runtime "com.simsilica:sim-fx:1.0.+:assets"^M

     compile 'org.meta-jb:meta-jb-json:1.0.1'

@@ -85,3 +89,19 @@ artifacts {
 }

+jar {^M
+    from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {^M
+        exclude "META-INF/*.SF"^M
+        exclude "META-INF/*.DSA"^M
+        exclude "META-INF/*.RSA"^M
+    }^M
+^M
+    manifest {^M
+        attributes 'Implementation-Title': 'SimArboreal Editor',^M
+                'Implementation-Version': version,^M
+                'Built-By': System.getProperty('user.name'),^M
+                'Built-Date': new Date(),^M
+                'Built-JDK': System.getProperty('java.version'),^M
+                'Main-Class': mainClassName^M
+    }^M
+}
\ No newline at end of file

However, I'm still seeing the same break.

Any suggestions?

pspeed42 commented 6 months ago

re: "I couldn't deduce from the project what version of the lwjgl-opengl library you were using, but seeing you last touched this in 2017 I'm guessing it was 3.1.0" ...it would have for sure been lwjgl2. I'd have to dig deeper to find more details.

simon-brooke commented 6 months ago

I'm going to close this now, because although I'm not sure how I have now got past this issue and have a build.