Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  Strange linux behaviour  (Read 2490 times)
0 Members and 1 Guest are viewing this topic.
Offline chris0

Senior Newbie




Java games rock!


« Posted 2007-05-09 13:11:54 »

Hi there,
I'm trying to use the combined plugin set on linux, but am running into a few problems. It appears that the linux plugin is loaded correctly, but it then seems to want to try to load the Windows and OSX plugins too. It can't seem to find them (even though they're in the same directory as everything else) and I get the following errors. It does, however seem to get past these errors and continue.
Secondly, it then seems to manage to find 8 controllers (5 keyboards and 3 mice!!).
Can anyone explain to me what is going on here?
Thanks in advance,
Chris.

Debug to follow...
Offline chris0

Senior Newbie




Java games rock!


« Reply #1 - Posted 2007-05-09 13:17:00 »

Scanning jar: jinput.jar
Examining file : META-INF/
Examining file : META-INF/MANIFEST.MF
Examining file : net/
Examining file : net/java/
Examining file : net/java/games/
Examining file : net/java/games/input/
Examining file : net/java/games/input/AbstractComponent.class
Examining file : net/java/games/input/AbstractController.class
Examining file : net/java/games/input/Component$Identifier$Axis.class
Examining file : net/java/games/input/Component$Identifier$Button.class
Examining file : net/java/games/input/Component$Identifier$Key.class
Examining file : net/java/games/input/Component$Identifier.class
Examining file : net/java/games/input/Component$POV.class
Examining file : net/java/games/input/Component.class
Examining file : net/java/games/input/Controller$PortType.class
Examining file : net/java/games/input/Controller$Type.class
Examining file : net/java/games/input/Controller.class
Examining file : net/java/games/input/ControllerEnvironment.class
Examining file : net/java/games/input/ControllerEvent.class
Examining file : net/java/games/input/ControllerListener.class
Examining file : net/java/games/input/DefaultControllerEnvironment$1.class
Examining file : net/java/games/input/DefaultControllerEnvironment$2.class
Examining file : net/java/games/input/DefaultControllerEnvironment$3.class
Examining file : net/java/games/input/DefaultControllerEnvironment$4.class
Examining file : net/java/games/input/DefaultControllerEnvironment.class
Examining file : net/java/games/input/Event.class
Examining file : net/java/games/input/EventQueue.class
Examining file : net/java/games/input/Keyboard.class
Examining file : net/java/games/input/Mouse.class
Examining file : net/java/games/input/PluginClassLoader$1.class
Examining file : net/java/games/input/PluginClassLoader$JarFileFilter.class
Examining file : net/java/games/input/PluginClassLoader.class
Examining file : net/java/games/input/Rumbler.class
Examining file : net/java/games/input/Version.class
Examining file : net/java/games/input/LinuxAbsInfo.class
Examining file : net/java/games/input/LinuxAbstractController.class
Examining file : net/java/games/input/LinuxAxisDescriptor.class
Examining file : net/java/games/input/LinuxComponent.class
Examining file : net/java/games/input/LinuxConstantFF.class
Examining file : net/java/games/input/LinuxControllers.class
Examining file : net/java/games/input/LinuxDevice.class
Offline chris0

Senior Newbie




Java games rock!


« Reply #2 - Posted 2007-05-09 13:17:21 »

Examining file : net/java/games/input/LinuxDeviceTask.class
Examining file : net/java/games/input/LinuxDeviceThread.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$1.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$2.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$3.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$4.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$5.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin$ShutdownHook.class
Examining file : net/java/games/input/LinuxEnvironmentPlugin.class
Found candidate class: net/java/games/input/LinuxEnvironmentPlugin.class
Adding class to plugins:net.java.games.input.LinuxEnvironmentPlugin
Examining file : net/java/games/input/LinuxEvent.class
Examining file : net/java/games/input/LinuxEventComponent.class
Examining file : net/java/games/input/LinuxEventDevice$1.class
Examining file : net/java/games/input/LinuxEventDevice.class
Examining file : net/java/games/input/LinuxForceFeedbackEffect$1.class
Examining file : net/java/games/input/LinuxForceFeedbackEffect$UploadTask.class
Examining file : net/java/games/input/LinuxForceFeedbackEffect$WriteTask.class
Examining file : net/java/games/input/LinuxForceFeedbackEffect.class
Examining file : net/java/games/input/LinuxInputID.class
Examining file : net/java/games/input/LinuxJoystickAbstractController.class
Examining file : net/java/games/input/LinuxJoystickAxis.class
Examining file : net/java/games/input/LinuxJoystickButton.class
Examining file : net/java/games/input/LinuxJoystickDevice.class
Examining file : net/java/games/input/LinuxJoystickEvent.class
Examining file : net/java/games/input/LinuxKeyboard.class
Examining file : net/java/games/input/LinuxMouse.class
Examining file : net/java/games/input/LinuxNativeTypesMap.class
Examining file : net/java/games/input/LinuxPOV.class
Examining file : net/java/games/input/LinuxRumbleFF.class
Examining file : net/java/games/input/NativeDefinitions.class
Examining file : net/java/games/input/ButtonUsage.class
Examining file : net/java/games/input/ElementType.class
Examining file : net/java/games/input/GenericDesktopUsage.class
Examining file : net/java/games/input/KeyboardUsage.class
Examining file : net/java/games/input/OSXAbstractController.class
Examining file : net/java/games/input/OSXComponent.class
Examining file : net/java/games/input/OSXControllers.class
Examining file : net/java/games/input/OSXEnvironmentPlugin.class
Found candidate class: net/java/games/input/OSXEnvironmentPlugin.class
Adding class to plugins:net.java.games.input.OSXEnvironmentPlugin
Examining file : net/java/games/input/OSXEvent.class
Examining file : net/java/games/input/OSXHIDDevice.class
Examining file : net/java/games/input/OSXHIDDeviceIterator.class
Examining file : net/java/games/input/OSXHIDElement.class
Examining file : net/java/games/input/OSXHIDQueue.class
Examining file : net/java/games/input/OSXKeyboard.class
Examining file : net/java/games/input/OSXMouse.class
Examining file : net/java/games/input/Usage.class
Examining file : net/java/games/input/UsagePage.class
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline chris0

Senior Newbie




Java games rock!


« Reply #3 - Posted 2007-05-09 13:17:44 »

Examining file : net/java/games/input/UsagePair.class
Examining file : net/java/games/input/AWTEnvironmentPlugin.class
Found candidate class: net/java/games/input/AWTEnvironmentPlugin.class
Adding class to plugins: net.java.games.input.AWTEnvironmentPlugin
Examining file : net/java/games/input/AWTKeyMap.class
Examining file : net/java/games/input/AWTKeyboard$Key.class
Examining file : net/java/games/input/AWTKeyboard.class
Examining file : net/java/games/input/AWTMouse$Axis.class
Examining file : net/java/games/input/AWTMouse$Button.class
Examining file : net/java/games/input/AWTMouse.class
Examining file : net/java/games/input/DIAbstractController.class
Examining file : net/java/games/input/DIComponent.class
Examining file : net/java/games/input/DIControllers.class
Examining file : net/java/games/input/DIDeviceObject.class
Examining file : net/java/games/input/DIDeviceObjectData.class
Examining file : net/java/games/input/DIEffectInfo.class
Examining file : net/java/games/input/DIIdentifierMap.class
Examining file : net/java/games/input/DIKeyboard.class
Examining file : net/java/games/input/DIMouse.class
Examining file : net/java/games/input/DataQueue.class
Examining file : net/java/games/input/DirectInputEnvironmentPlugin$1.class
Examining file : net/java/games/input/DirectInputEnvironmentPlugin$ShutdownHook.class
Examining file : net/java/games/input/DirectInputEnvironmentPlugin.class
Found candidate class: net/java/games/input/DirectInputEnvironmentPlugin.class
Adding class to plugins:net.java.games.input.DirectInputEnvironmentPlugin
Examining file : net/java/games/input/DummyWindow.class
Examining file : net/java/games/input/IDirectInput.class
Examining file : net/java/games/input/IDirectInputDevice.class
Examining file : net/java/games/input/IDirectInputEffect.class
Examining file : net/java/games/input/RawDevice.class
Examining file : net/java/games/input/RawDeviceInfo.class
Examining file : net/java/games/input/RawHIDInfo.class
Examining file : net/java/games/input/RawIdentifierMap.class
Examining file : net/java/games/input/RawInputEnvironmentPlugin.class
Found candidate class: net/java/games/input/RawInputEnvironmentPlugin.class
Adding class to plugins:net.java.games.input.RawInputEnvironmentPlugin
Examining file : net/java/games/input/RawInputEventQueue$QueueThread.class
Examining file : net/java/games/input/RawInputEventQueue.class
Examining file : net/java/games/input/RawKeyboard$Key.class
Examining file : net/java/games/input/RawKeyboard.class
Examining file : net/java/games/input/RawKeyboardEvent.class
Examining file : net/java/games/input/RawKeyboardInfo.class
Examining file : net/java/games/input/RawMouse$Axis.class
Examining file : net/java/games/input/RawMouse$Button.class
Examining file : net/java/games/input/RawMouse.class
Examining file : net/java/games/input/RawMouseEvent.class
Examining file : net/java/games/input/RawMouseInfo.class
Examining file : net/java/games/input/SetupAPIDevice.class
Examining file : net/java/games/input/WinTabButtonComponent.class
Examining file : net/java/games/input/WinTabComponent.class
Examining file : net/java/games/input/WinTabContext.class
Examining file : net/java/games/input/WinTabCursorComponent.class
Offline chris0

Senior Newbie




Java games rock!


« Reply #4 - Posted 2007-05-09 13:18:02 »

Examining file : net/java/games/input/WinTabDevice.class
Examining file : net/java/games/input/WinTabEnvironmentPlugin$1.class
Examining file : net/java/games/input/WinTabEnvironmentPlugin$ShutdownHook.class
Examining file : net/java/games/input/WinTabEnvironmentPlugin.class
Found candidate class: net/java/games/input/WinTabEnvironmentPlugin.class
Adding class to plugins:net.java.games.input.WinTabEnvironmentPlugin
Examining file : net/java/games/input/WinTabPacket.class
Examining file : net/java/games/util/
Examining file : net/java/games/util/Version.class
Examining file : net/java/games/util/plugins/
Examining file : net/java/games/util/plugins/Plugin.class
Found candidate class: net/java/games/util/plugins/Plugin.class
Examining file : net/java/games/util/plugins/PluginLoader.class
Examining file : net/java/games/util/plugins/Plugins.class
Examining file : net/java/games/util/plugins/test/
Examining file : net/java/games/util/plugins/test/ClassRenderer.class
Examining file : net/java/games/util/plugins/test/ListUpdater.class
Examining file : net/java/games/util/plugins/test/PluginTest.class
ControllerEnvironment net.java.games.input.LinuxEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e

awtevent 102Linux plugin claims to have found 6 controllers
ControllerEnvironment net.java.games.input.OSXEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e
java.lang.UnsatisfiedLinkError: no jinput-osx in java.library.pathControllerEnvironment net.java.games.input.AWTEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e

    at java.lang.ClassLoader.loadLibrary (ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java :87)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.java.games.input.DefaultControllerEnvironment.loadLibrary(DefaultControllerEnvironment.java:80)
    at net.java.games.input.OSXEnvironmentPlugin .<clinit>(OSXEnvironmentPlugin.java:59)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java :39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0 (Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java:201)
    at net.java.games.input.DefaultControllerEnvironment.scanControllers (DefaultControllerEnvironment.java:184)
    at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:59)
    at net.java.games.input.DefaultControllerEnvironment$4.run(DefaultControllerEnvironment.java :125)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:123)
    at InspectionVehicle.<init>( InspectionVehicle.java:25)
    at View.main(View.java:197)
Offline chris0

Senior Newbie




Java games rock!


« Reply #5 - Posted 2007-05-09 13:18:16 »

awtevent 101java.lang.UnsatisfiedLinkError: no jinput-dx8 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)
    at java.security.AccessController.doPrivileged (Native Method)
    at net.java.games.input.DefaultControllerEnvironment.loadLibrary(DefaultControllerEnvironment.java:80)
    at net.java.games.input.DirectInputEnvironmentPlugin.<clinit>(DirectInputEnvironmentPlugin.java :56)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java :308)
    at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java:201)
    at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java :184)
    at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:59)
    at net.java.games.input.DefaultControllerEnvironment$4.run(DefaultControllerEnvironment.java:125)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:123)
    at InspectionVehicle.<init>( InspectionVehicle.java:25)
    at View.main(View.java:197)
java.lang.UnsatisfiedLinkError: no jinput-raw in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0 (Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)
    at java.security.AccessController.doPrivileged (Native Method)
    at net.java.games.input.DefaultControllerEnvironment.loadLibrary(DefaultControllerEnvironment.java:80)
    at net.java.games.input.RawInputEnvironmentPlugin.<clinit>(RawInputEnvironmentPlugin.java :56)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java :308)
    at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java:201)
    at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java :184)
    at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:59)
    at net.java.games.input.DefaultControllerEnvironment$4.run(DefaultControllerEnvironment.java:125)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:123)
    at InspectionVehicle.<init>( InspectionVehicle.java:25)
    at View.main(View.java:197)
java.lang.UnsatisfiedLinkError: no jinput-wintab in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0 (Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)
    at java.security.AccessController.doPrivileged (Native Method)
    at net.java.games.input.DefaultControllerEnvironment.loadLibrary(DefaultControllerEnvironment.java:80)
    at net.java.games.input.WinTabEnvironmentPlugin.<clinit>(WinTabEnvironmentPlugin.java :13)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Offline chris0

Senior Newbie




Java games rock!


« Reply #6 - Posted 2007-05-09 13:18:39 »

ControllerEnvironment net.java.games.input.DirectInputEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e
ControllerEnvironment net.java.games.input.RawInputEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e
ControllerEnvironment net.java.games.input.WinTabEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@7d772e
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java :27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at net.java.games.input.DefaultControllerEnvironment.scanControllersAt (DefaultControllerEnvironment.java:201)
    at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java:184)
    at net.java.games.input.DefaultControllerEnvironment.access$000 (DefaultControllerEnvironment.java:59)
    at net.java.games.input.DefaultControllerEnvironment$4.run(DefaultControllerEnvironment.java:125)
    at java.security.AccessController.doPrivileged(Native Method)
    at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:123)
    at InspectionVehicle.<init>(InspectionVehicle.java:25)
    at View.main(View.java:197)

Found 8 controllers.
Found keyboard.
Found keyboard.
Found keyboard.
Mouse found.
Found keyboard.
Mouse found.
Found keyboard.
Mouse found.
Offline chris0

Senior Newbie




Java games rock!


« Reply #7 - Posted 2007-05-09 16:26:33 »

I've just tried this in Windows with pretty much the same result. A load of linker errors and 6 controllers (where there should be 2).
Any ideas?

ControllerEnvironment net.java.games.input.LinuxEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
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(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)


ControllerEnvironment net.java.games.input.OSXEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
java.lang.UnsatisfiedLinkError: no jinput-osx in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)


ControllerEnvironment net.java.games.input.AWTEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:123)
   at InspectionVehicle.<init>(InspectionVehicle.java:25)
   at View.main(View.java:197)

ControllerEnvironment net.java.games.input.DirectInputEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
ControllerEnvironment net.java.games.input.RawInputEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
ControllerEnvironment net.java.games.input.WinTabEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@e39a3e
java.lang.UnsatisfiedLinkError: E:\iain\VirtualResort2\ResortViewer\dll\jinput-wintab.dll: Can't find dependent libraries
   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 net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)


Found 6 controllers.
Keyboard found.
Mouse found.
Mouse found.
Keyboard found.
Keyboard found.
Mouse found.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #8 - Posted 2007-05-09 18:04:13 »

Hi

What command are you using to run, and what is the main class you are trying to run?. Is this with one of the jinput test classes or your own classes?

Cheers

Endolf.

Offline chris0

Senior Newbie




Java games rock!


« Reply #9 - Posted 2007-05-10 11:51:35 »

Hi Endolf,

I was running this with my own classes and through Eclipse, so there is no run command as such. However, I've since done some more tests at the command line with jinput-test. Here's the results...

Here's my setup:

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  
E:\test>dir /s
 Volume in drive E is Local Disk
 Volume Serial Number is 5CF4-E1DF

 Directory of E:\test

10/05/2007  10:33    <DIR>          .
10/05/2007  10:33    <DIR>          ..
10/05/2007  10:46    <DIR>          controller
29/10/2006  19:12            21,048 jinput-test.jar
               1 File(s)         21,048 bytes

 Directory of E:\test\controller

10/05/2007  10:46    <DIR>          .
10/05/2007  10:46    <DIR>          ..
29/10/2006  20:31            73,728 jinput-dx8.dll
29/10/2006  20:31            69,632 jinput-raw.dll
29/10/2006  19:12            21,048 jinput-test.jar
29/10/2006  20:31            69,632 jinput-wintab.dll
29/10/2006  20:31           196,436 jinput.jar
29/10/2006  19:12            10,204 libjinput-linux.so
29/10/2006  19:12            49,016 libjinput-osx.jnilib
               7 File(s)        489,696 bytes

     Total Files Listed:
               8 File(s)        510,744 bytes
               5 Dir(s)  30,457,348,096 bytes free


I've put jinput-test both in the controller directory and the directory above so that I can test it running from different locations.               
If I run the test from the controller directory then all seems well:

1  
2  
3  
E:\test\controller>java -Djava.library.path=. -classpath jinput-test.jar;jinput.jar net.java.games.input.test.ControllerReadTest
Component count = 6
Component count = 126


However, if I run the test from another directory I get all kinds of extra debug, various link errors and more listed components:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
E:\test>java -Djava.library.path=controller -classpath jinput-test.jar;controller\jinput.jar net.java.games.input.test.ControllerReadTest
Scanning jar: jinput-test.jar
Examining file : META-INF/
Examining file : META-INF/MANIFEST.MF
Examining file : net/
Examining file : net/java/
Examining file : net/java/games/
-- snip --
ControllerEnvironment net.java.games.input.LinuxEnvironmentPlugin loaded by sun.misc.Launcher$AppClassLoader@11b86e7
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(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:87)
        at java.security.AccessController.doPrivileged(Native Method)
        at net.java.games.input.DefaultControllerEnvironment.loadLibrary(DefaultControllerEnvironment.java:80)
-- snip --
Component count = 110
Component count = 6
Component count = 6
Component count = 126
Component count = 114
Component count = 6


This is basically what was happening when I was running with Eclipse. Do you know why the behaviour should be so different? Am I doing something wrong?
Even though I get all these errors, the test app does actually seem to run without any other problems.
Is there anything I can do to get things to run a bit more smoothly?

Thanks a lot,
Chris.
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 #10 - Posted 2007-05-10 20:55:52 »

Ok

It had me confused for a while, but I've spotted the issue. There are 3 ways that jinput can load a plugin (the bit that talks dirty to the OS). It can use the default plugin for a platform, under windows it's the direct x plugin. It can read a class name specified via a property, or it can scan a directory, examine all the jars for classes that extend ControllerEnvironment. The 2 places it looks are java.home/controller and user.dir/controller. user.dir is where you run your application.

In your case, because you are running in a directory that contains a controller folder, it scans the contents, which includes all the plugins, for every platform.

There was a request a while back that internally we check if a plugin is valid for the current platform, and load it or not as the flag indicates, but it was never implemented as this is a rare situation. Originally we didn't ship a combined plugin zip, so you got the one for the right platform. When jinput started being used, the common use case was that people wanted to webstart the application and thus the common zip came about, and in that cases, there was no controller dir, so it 'just worked'. An over sight on my behalf I suppose.

Short term, you can resolve the issue by renaming that folder to something else. Longer time, I guess this shows us we do need the isSupportedOnThisPlatform type method.

HTH

Endolf

Offline chris0

Senior Newbie




Java games rock!


« Reply #11 - Posted 2007-05-10 22:06:39 »

Thanks Endolf,

I didn't realise that there was an auto-detect for the plugin, which is why I thought I needed the controller directory. That's explained it all though, and it's working fine now. I guess isSupportedOnThisPlatform() would be useful though as multi-platform support is quite common these days.

Cheers,
Chris.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #12 - Posted 2007-05-10 22:11:56 »

As lon as you don't have a controllers directory, the default plugin detection will pick the plugin for your platform, so all you need is the jinput.jar and the native libraries, and all is good Smiley

the isSupported method would just be there to prevent the situation when it does default to scanning a directory, and more than 1 platforms plugins are there, and also things like the wintab plugin could refrain from loading if the wintab dll is not present. Plugins can be written for a number of reasons, like particular hardware, not just platforms, so what ever the requirements, isSupported makes sure it's there. These additional plugins are only loaded if specified with the jinput.plugins property or if there is a controller directory with plugins in. It seems to be a very uncommon use case currently though.

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.

CogWheelz (15 views)
2014-07-30 21:08:39

Riven (22 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!