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.