Strange linux behaviour

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…

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

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

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

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)

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.(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.( 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.(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.( 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.(WinTabEnvironmentPlugin.java :13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: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.(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.

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.(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.

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.

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:

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:

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:

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.

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

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.

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 :slight_smile:

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