im running through some video tutorials on youtube with slick 2d and im running into a problem i did everything like the guy said and his runs fine but mine gives me all these
Exception in thread "main" java.lang.NoSuchMethodError: getPointer
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.lwjgl.Sys$1.run(Sys.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
at org.lwjgl.Sys.loadLibrary(Sys.java:84)
at org.lwjgl.Sys.<clinit>(Sys.java:101)
at org.lwjgl.opengl.Display.<clinit>(Display.java:128 )
at org.newdawn.slick.AppGameContainer$1.run(AppGameCo ntainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGam eContainer.java:36)
at javagame.Game.main(Game.java:27)
these are my 3 files codes
Game.java
package javagame; import org.newdawn.slick.*; import org.newdawn.slick.state.*; public class Game extends StateBasedGame { public static final String gamename = "Ham Blaster!"; public static final int menu = 0; public static final int play = 1; public Game(String gamename) { super(gamename); this.addState(new Menu(menu)); this.addState(new Play(play)); } public void initStatesList(GameContainer gc) throws SlickException { this.getState(menu).init(gc, this); this.getState(play).init(gc, this); this.enterState(menu); } public static void main(String[] args) { AppGameContainer appgc; try { appgc = new AppGameContainer(new Game(gamename)); appgc.setDisplayMode(640, 360, false); appgc.start(); }catch(SlickException e) { e.printStackTrace(); } } }
Menu.java
package javagame; import org.newdawn.slick.*; import org.newdawn.slick.state.*; public class Menu extends BasicGameState { public Menu(int state) { } public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { } public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { } public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { } public int getID() { return 0; } }
Play.java
package javagame; import org.newdawn.slick.*; import org.newdawn.slick.state.*; public class Play extends BasicGameState { public Play(int state) { } public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { } public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { } public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { } public int getID() { return 1; } }
anyone have any idea what my problem would be?
this is cross posted here: TheNewBoston Forum • View topic - having a problem with the game dev tutorials (errors)
thanks for any kind of help