Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Slick2D Runnable Jar Not Running (java.lang.UnsatisfiedLinkError)

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    2
    My Mood
    Goofy
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Slick2D Runnable Jar Not Running (java.lang.UnsatisfiedLinkError)

    When I try to run my runnable jar file, it wont do anything. And when I try to run it from the console, it says "java.lang.UnsatisfiedLinkError: no LWJGL in java.library.path..."

    How do I fix this?

    I've specified the path by properties > Libraries > lwjgl.jar > Native Library Location > .... And I chose the right paths. But I still get that java.lang.UnsatisfiedLinkError.

    It says I'm getting an error on line 34 which is:
    appgc = new AppGameContainer(new Game(gamename));

    My whole main class is:
    package net.battleboy;
     
    import org.newdawn.slick.*;
    import org.newdawn.slick.state.*;
     
    public class Game extends StateBasedGame {
     
    	public static final String gamename = "Battle Boy 1.0 ALPHA";
    	public static final int menu = 0;
    	public static final int play = 1;
    	public static final int settings = 2;
     
    	public Game(String gamename) {
     
    		super(gamename);
    		this.addState(new Menu(menu));
    		this.addState(new Play(play));
    		this.addState(new Settings(settings));
     
    	}
     
    	public void initStatesList(GameContainer gc)throws SlickException {
     
    		this.getState(menu).init(gc, this);
    		this.getState(play).init(gc, this);
    		this.getState(settings).init(gc, this);
    		this.enterState(menu);
     
    	}
     
    	public static void main(String[] args) {
    		AppGameContainer appgc;
    		try {
    			appgc = new AppGameContainer(new Game(gamename));
    			appgc.setIcon("res/icon.png");
    			appgc.setDisplayMode(840, 470, false);
    			appgc.start();
    		}catch(SlickException e) {
    			e.printStackTrace();
    		}
     
    	}
    }


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Slick2D Runnable Jar Not Running (java.lang.UnsatisfiedLinkError)

    Welcome to the forum! Thanks for taking the time to learn how to post code correctly. If you haven't already, please read this topic to learn other useful info for new members.

Similar Threads

  1. Replies: 21
    Last Post: June 12th, 2013, 11:33 AM
  2. Exporting Runnable JAR File
    By cr80expert5 in forum Object Oriented Programming
    Replies: 3
    Last Post: January 26th, 2012, 09:35 PM
  3. (JNA) java.lang.UnsatisfiedLinkError: Unable to load library
    By Shockah in forum Java Native Interface
    Replies: 4
    Last Post: October 3rd, 2011, 11:29 AM
  4. Help ! java.lang.UnsatisfiedLinkError
    By CTheSky in forum Java Theory & Questions
    Replies: 1
    Last Post: July 7th, 2011, 12:50 PM
  5. java.lang.UnsatisfiedLinkError
    By H P in forum Java Native Interface
    Replies: 3
    Last Post: January 28th, 2010, 05:04 AM