This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java slick game  RSS feed

 
Adryan Bone
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,please help me with this eror:

Exception in thread "main" org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:378)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
at ady.Start.main(Start.java:38)

 
Stephan van Hulst
Saloon Keeper
Posts: 7716
141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adryan, welcome to CodeRanch!

This usually happens when your system doesn't have hardware support for OpenGL. You can use the software drivers by adding this option to your VM arguments: -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true
 
Adryan Bone
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks...but now i have this:
Error: Could not find or load main class Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true
 
Henry Wong
author
Sheriff
Posts: 23277
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adryan Bone wrote:thanks...but now i have this:
Error: Could not find or load main class Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true


I think you misread the response. It was referring to a system property, which is invoked via "-D". You probably forgot to include the hyphen.

Henry
 
Adryan Bone
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another error unfortunately:
Exception in thread "main" java.lang.RuntimeException: Resource not found: Desert.jpg
at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoader.java:69)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:185)
at org.newdawn.slick.Image.<init>(Image.java:192)
at org.newdawn.slick.Image.<init>(Image.java:166)



PS: i tried to add images,to set backgroud.
 
Henry Wong
author
Sheriff
Posts: 23277
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The error is reporting that it could not find the file in the resource (jar file). Can you confirm that the file in indeed included in the jar?

Henry
 
Adryan Bone
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i solve that thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!