Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (120)
games submitted by our members
Games in WIP (577)
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  
  OSXEnvironmentPlugin is not supported?  (Read 2817 times)
0 Members and 1 Guest are viewing this topic.
Offline CueMeX

Junior Newbie





« Posted 2009-04-29 19:18:33 »

Hello.

I'm trying to use my PS3 Controller with Java and jinput. I downloaded the files and ran the

java -Djava.library.path=. -cp jinput.jar:jinput-test.jar net.java.games.input.test.ControllerReadTest

test application. And it worked fine. Now I use the same source code in my eclipse project but it doesn't work.

I get the message:
Loading: net.java.games.input.OSXEnvironmentPlugin
java.lang.UnsatisfiedLinkError: /Users/.../lib/libjinput-osx.jnilib:
net.java.games.input.OSXEnvironmentPlugin is not supported
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at net.java.games.input.OSXEnvironmentPlugin$1.run(OSXEnvironmentPlugin.java:78)
   at java.security.AccessController.doPrivileged(Native Method)
   at net.java.games.input.OSXEnvironmentPlugin.loadLibrary(OSXEnvironmentPlugin.java:70)
   at net.java.games.input.OSXEnvironmentPlugin.<clinit>(OSXEnvironmentPlugin.java:110)
   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 sailworld.RobSailer.main(RobSailer.java:42)

The jar file as well as the native libraries are included in the class path and the libjinput-osx.jnilib file is at the position, where the jvm cannot find it.

Can someone help me to get this run?

Thanks CueMex

Edit:
I have a Mac OS X System with an Intel processor
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2009-04-30 17:04:43 »

This is just saying that your project isn't set up correctly and it can't find the native. Either set the natives in the properties of the jinput.jar, or pass that -Djava.library.path flag as a runtime VM arguement in the run settings.

HTH

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #2 - Posted 2009-04-30 20:14:01 »

Editing your post after I respond doesn't help me figure out what you changed Smiley

You say the jar is on the classpath. That's ok, the binary being on the classpath is irrelevant as natives can only be loaded from java.library.path or lib/ext in the jre if I remember correctly. The location that it's failing to load from is /lib/ in the root of your file system. Is that really where you put the native file?

HTH

Endolf

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CueMeX

Junior Newbie





« Reply #3 - Posted 2009-05-01 09:00:45 »

Thank you for the answer.

But i tried the Djava.library.path flag, than the jvm searches the native lib in the given path but cannot find it anyway. I tried pathes without spaces like: /User/bla/Desktop insted of /User/bla/Documents/Projekt - RobSailer/ but it still isn't working. I had also set up the native directory for the jar and it still isn't working.

With Windows it is no problem to set up the native lib.

More help?

Thx
CueMeX
Offline CueMeX

Junior Newbie





« Reply #4 - Posted 2009-05-02 10:47:32 »

Now I tried to put the libjinput-osx.jnilib in the path /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/ where all the other native libraries are. I removed the the information in the eclipse project where to find the native lib. When i then started the application. i got the following message:

java.lang.UnsatisfiedLinkError: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjinput-osx.jnilib:
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1723)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at net.java.games.input.OSXEnvironmentPlugin$1.run(OSXEnvironmentPlugin.java:78)
   at java.security.AccessController.doPrivileged(Native Method)
   at net.java.games.input.OSXEnvironmentPlugin.loadLibrary(OSXEnvironmentPlugin.java:70)
   at net.java.games.input.OSXEnvironmentPlugin.<clinit>(OSXEnvironmentPlugin.java:110)
   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 sailworld.util.SailInputPad.<init>(SailInputPad.java:20)
   at sailworld.RobSailer.main(RobSailer.java:36)

I think that means, that the native lib was found. Are there other dependencies?

CueMeX
Offline CueMeX

Junior Newbie





« Reply #5 - Posted 2009-05-02 15:18:13 »

Hm.
Now I put the jar and the native lib in the directories of my javavm.
When i export my application to a jar file and start it it works.
But i have to export it, i cannot start the application out of eclipse.

Thanks for the posts. I can live with this solution.
If anyone knows why there is a problem with eclipse, i am thankful. But it works now.

CueMeX
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #6 - Posted 2009-05-03 17:53:04 »

Hi

I'm still a bit puzzled by this. I'm not a mac user normally, but have one for building JInput. It seems to work ok there. I'm glad you have a method that works for you.

Cheers

Endolf

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.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (43 views)
2014-10-16 15:22:06

Norakomi (33 views)
2014-10-16 15:20:20

lcass (37 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (86 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!