Hello I made a simple game and I want to share it to my friend but he cant run it. I'm assuming it's because he has windows 10 and the LWJGL 2 native files don't support that (I've asumed that based on the .bat run file (a standard Java -jar a.jar line) wich crashed right before it is supposed to initialize windows 10). Maybe that isn't the problem but I don't see any other issue. Do the native files support newer systems? If not, then could you give me suggestions on getting new native files or something. Thanks
What you have probably overlooked is the
-Djava.library.path flag. This is a flag that must be set when running the
java command to tell the JVM where the native files are located. Let's say you have this file hierarchy:
- natives/ (*.dll, *.so)
You'd want to run the
.jar with the following command:
java -Djava.library.path="natives/" -jar yourGame.jar
Make sure that you export the
.jar as a "Runnable JAR File" so that all libraries are included.
You didn't need to do this setup on your own computer because you've already imported the native files in your IDE. When distributing your game though, I suggest a file with the given
java command and a
pause command (on Windows) so that the person who runs the game can easily send you a screenshot or copy-paste of any error or debugging information.