小编tra*_*000的帖子

java.lang.NoClassDefFoundError:org/lwjgl/LWJGLException

尝试在学校玩游戏时,我在尝试使用eclipse运行时不断收到"java.lang.NoClassDefFoundError:org/lwjgl/LWJGLException".有任何想法吗?这是我的代码

package javagame;
import org.newdawn.slick.*;
import org.newdawn.slick.state.*;


public class Game extends StateBasedGame{

private static final String GAME_NAME = "TEST";
private static final int MENU = 0;
private static final int PLAY = 1;

public Game(String GAME_NAME){
    super(GAME_NAME);
    this.addState(new Menu(MENU));
    this.addState(new Play(PLAY));
}// end constructor

public void initStatesList(GameContainer gc) throws SlickException{
    this.getState(MENU).init(gc, this);
    this.getState(PLAY).init(gc, this);
    this.enterState(MENU);
}//end initStateList method

public static void main(String[] args) {
    AppGameContainer appgc;
    try{
        appgc = new AppGameContainer(new Game(GAME_NAME));
        appgc.setDisplayMode(640, 360, false);
        appgc.start();
    }//end try
    catch(SlickException e){ …
Run Code Online (Sandbox Code Playgroud)

java noclassdeffounderror lwjgl classnotfoundexception slick2d

5
推荐指数
1
解决办法
8953
查看次数