# Java LWJGL Windows 10 native files

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 does the errormessage in the console say? Oct 23 '15 at 20:31
• Why not run the .jar Oct 23 '15 at 20:32
• I dont exactly remember the error message but it was something like: didnt load libraries. And he did run it through the jar file but when it crashes you dont know why, in cmd it says whats happening Oct 23 '15 at 20:36
• Have you set the -Djava.library.path switch? Relevant: Distributing Your LWJGL Application Oct 23 '15 at 21:14

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)
• yourGame.jar

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.