Hello Guest

joml.jar troubles if I run my project from command line

  • 2 Replies
  • 33 Views
*

Offline sc

  • *
  • 2
joml.jar troubles if I run my project from command line
« on: September 13, 2019, 07:08:21 »
I've started using lwjgl a couple of weeks ago, and everything was going well until I wanted to run my project from the command line.

I get the error :
Code: [Select]
D:\nb\OGL_Engine\dist>java -jar OGL_Engine.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/joml/Vector3f
        at be.tpfc.Game.<init>(Game.java:40)
        at be.tpfc.engine.Engine.<init>(Engine.java:48)
        at be.tpfc.Main.main(Main.java:24)
Caused by: java.lang.ClassNotFoundException: org.joml.Vector3f
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 3 more

... as if it cannot find the joml.jar ?

I'm using Netbeans10 on Windows10 with lwjgl-release-3.2.3 (and joml.jar from that release) and AdoptOpenJDK\jdk-11.0.4.11-hotspot.
I've spent a couple of hours on it already, but I have no idea what I'm doing wrong ... ???

*

Offline KaiHH

  • ***
  • 195
Re: joml.jar troubles if I run my project from command line
« Reply #1 on: September 13, 2019, 08:25:21 »
You only have a single jar file (OGL_Engine.jar) in the classpath. Do you shade all jars into this OGL_Engine.jar file or do you use the "Class-Path" MANIFEST.MF entry to specify all other (LWJGL and JOML) jars?

*

Offline sc

  • *
  • 2
Re: joml.jar troubles if I run my project from command line
« Reply #2 on: September 13, 2019, 10:08:16 »
You only have a single jar file (OGL_Engine.jar) in the classpath. Do you shade all jars into this OGL_Engine.jar file or do you use the "Class-Path" MANIFEST.MF entry to specify all other (LWJGL and JOML) jars?

I'm afraid you lost me there ... :-[

If I open up the OGL_Engine.jar, I can see that there are no other jars included. (Out of curiousity : how would I do that ?) But, there is a manifest.mf file.
No other dependencies specified though.
I'll Google some more to find out how to add everything. Somehow, I thought the IDE was going to do that for me ...
Thanks for steering me in the right direction !
« Last Edit: September 13, 2019, 10:13:37 by sc »