I am trying to run this code, which is used to verify the settings are correct:
package simpleslickgame;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
public class SimpleSlickGame extends BasicGame
{
public SimpleSlickGame(String gamename)
{
super(gamename);
}
@Override
public void init(GameContainer gc) throws SlickException {}
@Override
public void update(GameContainer gc, int i) throws SlickException {}
@Override
public void render(GameContainer gc, Graphics g) throws SlickException
{
g.drawString("Howdy!", 10, 10);
}
public static void main(String[] args)
{
try
{
AppGameContainer appgc;
appgc = new AppGameContainer(new SimpleSlickGame("Simple Slick Game"));
appgc.setDisplayMode(640, 480, false);
appgc.start();
}
catch (SlickException ex)
{
Logger.getLogger(SimpleSlickGame.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
All the work that I did led me to check the natives again and again, and I'm sure I did everything right. When I go to the libraries in this way of building the project, the JRE System library and Slick2D both say that the Native library location: ... / windows / x64. I tried only ... / windows, and I tried it with a non-native JRE. I followed two different tutorials on how to do this, and I keep getting errors trying to run this simple code. Any help?
source
share