Problem with classpath and inclued LWJGL library for my .jar file !

With ANT write the line Class-Path from MANIFEST.MF like this:

Class-Path: lib/lwjgl.jar lib/lwjgl_util.jar lib/jinput.jar

And yet it tells me it can not find the library classes, I began well for all files .jar library in a sub-folder lib!


+build
   +lib
       lwjgl.jar
       lwjgl_util.jar
       jinput.jar
   app.jar

Why it does not work?

What error are you seeing?, are you sure it’s not the natives that are missing?

Endolf

Is it also necessary that the line “Class-Path:” I Mettes link to. jnilib and. dylib that is located in the native / macosx /?
Otherwise these files. jnilib and. dylib are in the folder “lib”, I forget to put them in my drawing.

When I use the tool “Jar Bundler” mac, I add the files in the library as a resource and there it works … but how am I going to create the. exe for windows and linux? For the “Jar Bundler” creates one .app, and it does not seem to me that it turned a bit. app in. exe or running Linux.

Packaging is something that is problematic when you start needing natives. Some people create .bat or .sh files to run the application, others use installers like izpack, some will try and compile native .exe files that launch the jvm.

The bat/sh files are probably the quickest to get running, but least professional looking. Installers like izpack are probably the best compromise of ease to create and nice user experience (in my opinion). Some are free, some are not.

HTH

Endolf

You can also use Launch4J to create windows exe files but the output files only work on windows.

Another tool you can use is JarSplice, this will create a single executable jar file (from all your jars and native files). This will then work on windows, mac and linux. Although it creates a fat jar, it does simplify deployment as it merges all jars and natives into one file.

A BIG THANK YOU for your link JarSplice ")!
It solves my all problems at once;)!