Hello Guest

[Solved] GTX 1060 - "Pixel format not accelerated" when running the jar

  • 2 Replies
  • 5161 Views
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.

Code: [Select]
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:

Code: [Select]
# 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
« Last Edit: February 04, 2017, 12:29:39 by JonJomate »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: GTX 1060 - "Pixel format not accelerated" when running the jar
« Reply #1 on: February 04, 2017, 09:57:30 »
This is a known issue with Nvidia driver 378.49, see this post for details. A hotfix driver is available here.

Re: GTX 1060 - "Pixel format not accelerated" when running the jar
« Reply #2 on: February 04, 2017, 12:29:15 »
Thank you! Works fine with the hotfixed version.