Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
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  
  UnsatisfiedLinkError with Linux  (Read 2252 times)
0 Members and 1 Guest are viewing this topic.
Offline coconuts

Junior Newbie





« Posted 2009-04-15 15:34:27 »

Hi,

I downloaded JInput from https://jinput.dev.java.net/
I created a test class :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
import net.java.games.input.Controller;
import net.java.games.input.ControllerEnvironment;

public class TestControllers {
   public static void main(String[] args) {
      ControllerEnvironment ce = ControllerEnvironment.getDefaultEnvironment();
      Controller[] controllers = ce.getControllers();
      for (Controller controller : controllers) {
         System.out.println("-> " + controller.getType());
         System.out.println("\t" + controller);
      }
   }
}


It works well with Windows XP, but not with Linux Ubuntu 8.10 (kernel 2.6.27-11-generic) !
I have an exception with Eclipse :
Quote
Loading: net.java.games.input.LinuxEnvironmentPlugin
Failed to load 64 bit library: no jinput-linux64 in java.library.path
java.lang.UnsatisfiedLinkError: no jinput-linux in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at net.java.games.input.LinuxEnvironmentPlugin$1.run(LinuxEnvironmentPlugin.java:65)
   at java.security.AccessController.doPrivileged(Native Method)
   at net.java.games.input.LinuxEnvironmentPlugin.loadLibrary(LinuxEnvironmentPlugin.java:58)
   at net.java.games.input.LinuxEnvironmentPlugin.<clinit>(LinuxEnvironmentPlugin.java:92)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:169)
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:156)
   at TestControllers.main(TestControllers.java:10)
net.java.games.input.LinuxEnvironmentPlugin is not supported

Can you help me, please ?
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #1 - Posted 2009-04-15 16:22:25 »

Are you on a 64 bit ubuntu?

I don't know how old that build was, does the latest nightly from http://www.newdawnsoftware.com/resources/jinput/jinput_nightly_<date>.zip do the same thing?

Cheers

Endolf

P.S. if you're using xinput-evdev (the default in 8.10) you might have to play with some of the X settings. They broke a load of stuff, see this thread

Offline coconuts

Junior Newbie





« Reply #2 - Posted 2009-04-15 16:40:18 »

Thanks for your answer.

Quote
Are you on a 64 bit ubuntu?
No !

I have put "libjinput-linux.so" at the root of my project, and found a solution with a VM argument :
Quote
-Djava.library.path="./"
It works fine  Smiley

But the keyboard is not found  Sad just my gamepad. I have the message :
Quote
Loading: net.java.games.input.LinuxEnvironmentPlugin
Failed to open device (/dev/input/event3): Failed to open device /dev/input/event3 (13)
Failed to open device (/dev/input/event6): Failed to open device /dev/input/event6 (13)
Failed to open device (/dev/input/event5): Failed to open device /dev/input/event5 (13)
Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)
Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)
Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)
Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)
Linux plugin claims to have found 1 controllers
-> Stick
   Saitek P990 Dual Analog Pad

And the buttons and paddle are without effects !  Sad (with ubuntu, not with Windows)

I am going to try the latest nightly...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #3 - Posted 2009-04-15 16:46:53 »

Only rumble effects are supported currently.

Failed to open device implies that the user you are running as doesn't have read permissions to /dev/input/event* nodes. No effects might also be caused by having no write permissions to the appropriate device node.

HTH

Endolf

Offline CyanPrime
« Reply #4 - Posted 2009-04-15 16:52:19 »

Maybe you have the ddl in the right place, but Linux doesn't use DLL so you need that other ext there too.
Offline coconuts

Junior Newbie





« Reply #5 - Posted 2009-04-15 17:17:46 »

Well. I put user permissions on files "event*" and the Keyboard works perfectly, haleluya Cheesy
But i have still some problems with gamepads. I would create a new topic.
Thank you very much for your advices  Smiley
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.

BurntPizza (25 views)
2014-09-21 02:42:18

BurntPizza (16 views)
2014-09-21 01:30:30

moogie (19 views)
2014-09-21 00:26:15

UprightPath (26 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (44 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (100 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56

mitcheeb (71 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!