jar/exe - Error: Could not find or load main class

Hi.

When I put everything by myself in a folder it works:

But I have to add something in my bat file or else it won’t work because it can’t find lwjgl64.

[quote]-Djava.library.path=.\lwjgl\native\windows
[/quote]

Now I wanted to only make one jar file or exe. I tried JarSplice and Launch4J.
But both times I get a error message:

I remember I had this same problem some years ago but I forgot how I solved it.
My Project looks like this:

I can recommed the maven assembly plugin which takes care of building a .jar (makes only sense if you use maven tho).
I wasnt able to create a fat .jar with either JarSplice or Launch4J in combination with Slick2D somehow as well.
Thats why I use the maven assembly plugin.

Hello

You have to add the JARs of the third party dependencies into your classpath by using “-classpath” but you can’t do that if you use “-jar”. If you stick to using “-jar”, it will have to contain all necessary class files.

I advise you to run your program in command line without making a single fat JAR as a first step to be 100% sure of the required JARs and resources. Then, make a fat JAR.

This might help.