Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (499)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [LWJGL] UnsatisfiedLinkError //solved  (Read 1325 times)
0 Members and 1 Guest are viewing this topic.
Offline pl4n3

Junior Newbie





« Posted 2012-06-06 10:59:59 »

Hello Java-Gaming Community,

Please excuse my poor language skills.
I've just learned the basics of Java.
I try now to go a little further and maybe to create my first game with a game engine.

I've decided to use Slick and lwjgl for my first try.
Unfortunately I have already a problem.

I get this error message in eclipse:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\MyName\Desktop\test\lwjgl-2.8.4\native\windows\lwjgl.dll: The specified path is invalid
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   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(AppGameContainer.java:39)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
   at Game.main(Game.java:41)


Sourcecode i try to Run:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
import org.newdawn.slick.Animation;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.SpriteSheet;
import org.newdawn.slick.tiled.TiledMap;
 
public class Game extends BasicGame {
   private float playerX=320;
   private float playerY=240;
   private TiledMap map;  
   private Animation player;
   public Game() {
      super("Simple Test Code");
   }
   public void init(GameContainer container) throws SlickException {
      container.setVSync(true);
      SpriteSheet sheet = new SpriteSheet("data/player.png",32,32);
      map = new TiledMap("data/unbenannt.tmx");      
      player = new Animation();
      player.setAutoUpdate(true);
      for (int frame=0;frame<3;frame++) {
         player.addFrame(sheet.getSprite(frame,0), 150);
      }      
   }
   public void update(GameContainer container, int delta) {
      if (container.getInput().isKeyDown(Input.KEY_LEFT)) {playerX--;}
      if (container.getInput().isKeyDown(Input.KEY_RIGHT)) {playerX++;}
      if (container.getInput().isKeyDown(Input.KEY_UP)) {playerY--;}
      if (container.getInput().isKeyDown(Input.KEY_DOWN)) {playerY++;}
   }
   public void render(GameContainer container, Graphics g)  {
      map.render(0, 0);
      g.drawAnimation(player, playerX, playerY);
   }
   public static void main(String[] argv) throws SlickException {
      AppGameContainer container =
         new AppGameContainer(new Game(), 640, 480, false);
      container.start();
   }
}


Configuration: (Image)


Can you help me?
what am I doing wrong?

With best regards
~pl4n3








Offline Phased
« Reply #1 - Posted 2012-06-06 11:03:57 »

did you add the native to LWJGL?
nvm, image never loaded.
Offline pl4n3

Junior Newbie





« Reply #2 - Posted 2012-06-06 11:10:34 »

do you mean the folder?




With best regards
~pl4n3
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Phased
« Reply #3 - Posted 2012-06-06 11:13:52 »

To what i believe its just cant find the native file lwjgl.dll but that picture has it there, you havnt moved the folder that contains the native library? to somewhere else then your desktop?
Offline pl4n3

Junior Newbie





« Reply #4 - Posted 2012-06-06 11:21:44 »

I've checked.

If the path is wrong, there is another error:

1  
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path


I'm confused.

With best regards
~pl4n3
Offline Phased
« Reply #5 - Posted 2012-06-06 11:26:29 »

in your configuration picture, you have Lwjgl I don't think there is suppose to be any capitals, mine is lwjgl other then that I have no clue.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2012-06-06 11:49:26 »

Is C:\Users\MyName\Desktop\test\lwjgl-2.8.4\native\windows\lwjgl.dll an actual valid path?

Cas Smiley

Offline pl4n3

Junior Newbie





« Reply #7 - Posted 2012-06-06 11:59:46 »

@princec: yes Smiley

Thank you for your help.
my workspace accidentally was on a shared folder (other computer)
which apparently results that the native can not be found (or something like that.)  Shocked

SOLVED

With best regards
~pl4n3

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (44 views)
2014-04-15 18:08:23

BurntPizza (40 views)
2014-04-15 03:46:01

UprightPath (56 views)
2014-04-14 17:39:50

UprightPath (38 views)
2014-04-14 17:35:47

Porlus (54 views)
2014-04-14 15:48:38

tom_mai78101 (77 views)
2014-04-10 04:04:31

BurntPizza (136 views)
2014-04-08 23:06:04

tom_mai78101 (236 views)
2014-04-05 13:34:39

trollwarrior1 (197 views)
2014-04-04 12:06:45

CJLetsGame (205 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!