My game runs perfectly fine in Eclipse.
When i export it to a .jar, bundle natives and jars together with JarSplice and double click the file, nothing happens.
Now when i run the game via cmd.exe (Windows 10), i get the Pixel format not accelerated error.
org.lwjgl.LWJGLException: Pixel format not accelerated
I have a GTX 1060, laptop version, and the drivers are up to date (378.49), other games run fine and the game runs fine in Eclipse. I suspect that this error is only showing up because im running the jar via cmd.exe and it doesn't find a display while in that environment. So, that might not be the actual issue at all, but sadly i can't see the stack trace when double clicking the file.
Is there a way around it? Or should the game run even when being executed from cmd.exe? Thank you in advance.
By the way, i tried the following variations on executing the file in cmd:
# Prints the error
java -jar game.jar
java.exe -jar game.jar
# No output for all of these, just a short mouse load indicator and return to the prompt
javaw -jar game.jar
javaw.exe -jar game.jar
"C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe" -jar game.jar
This is a known issue with Nvidia driver 378.49, see this post (http://forum.lwjgl.org/index.php?topic=6439.msg34284#msg34284) for details. A hotfix driver is available here (https://nvidia.custhelp.com/app/answers/detail/a_id/4378).
Thank you! Works fine with the hotfixed version.