Getting the test suite to run

I think I’ve done all the acrobatics to get things compiled and placed where they belong yet still I get

 [java] Controller Env = net.java.games.input.DefaultControllerEnvironment@1004901
 [java] Scanning jar: dxinput.jar
 [java] Examining file : META-INF/
 [java] Examining file : META-INF/MANIFEST.MF
 [java] Examining file : net/
 [java] Examining file : net/java/
 [java] Examining file : net/java/games/
 [java] Examining file : net/java/games/input/
 [java] Examining file : net/java/games/input/DirectInputAxis.class
 [java] Examining file : net/java/games/input/DirectInputDevice.class
 [java] Examining file : net/java/games/input/DirectInputEnvironmentPlugin.class
 [java] Found candidate class: net/java/games/input/DirectInputEnvironmentPlugin.class
 [java] Adding class to plugins:net.java.games.input.DirectInputEnvironmentPlugin
 [java] Examining file : net/java/games/input/DirectInputKeyboard.class
 [java] Examining file : net/java/games/input/DirectInputMouse$BallAxis.class
 [java] Examining file : net/java/games/input/DirectInputMouse$BallImpl.class
 [java] Examining file : net/java/games/input/DirectInputMouse$ButtonImpl.class
 [java] Examining file : net/java/games/input/DirectInputMouse$ButtonsImpl.class
 [java] Examining file : net/java/games/input/DirectInputMouse.class
 [java] Examining file : net/java/games/input/DirectInputRumbler.class
 [java] java.lang.UnsatisfiedLinkError: getNumButtons
 [java]     at net.java.games.input.DirectInputMouse.getNumButtons(Native Method)
 [java]     at net.java.games.input.DirectInputMouse.access$200(DirectInputMouse.java:50)
 [java]     at net.java.games.input.DirectInputMouse$ButtonsImpl.<init>(DirectInputMouse.java:183)
 [java]     at net.java.games.input.DirectInputMouse.<init>(DirectInputMouse.java:88)
 [java]     at net.java.games.input.DirectInputMouse.createMouse(DirectInputMouse.java:146)
 [java]     at net.java.games.input.DirectInputEnvironmentPlugin.addDevice(DirectInputEnvironmentPlugin.java:159)
 [java]     at net.java.games.input.DirectInputEnvironmentPlugin.enumDevices(Native Method)
 [java]     at net.java.games.input.DirectInputEnvironmentPlugin.enumControllers(DirectInputEnvironmentPlugin.java:1
  1. [java] at net.java.games.input.DirectInputEnvironmentPlugin.(DirectInputEnvironmentPlugin.java:113)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    [java] at java.lang.Class.newInstance0(Class.java:306)
    [java] at java.lang.Class.newInstance(Class.java:259)
    [java] at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java
    :208)
    [java] at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java:1
  2. [java] at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:58)
    [java] at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:109)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:10
  3. [java] at net.java.games.input.test.ControllerTextTest.(ControllerTextTest.java:54)
    [java] at net.java.games.input.test.ControllerTextTest.main(ControllerTextTest.java:86)
    [java] Exception in thread “main”
    when I try to use ant to run any of the tests. Any clue which wrong turn I made?

Thanks,
Dale.

This looks like an error on the JInput side of things …
endolf?

Hi
Unsatisfied link errors should happen before that point if the dxjinput dll is missing, which makes me think the dll you have compiled is broken some how (the getNumButtons method is not there). The CVS version of the C code has it (just checked), so I can’t see why it’s not finding it.
The only thing I can think of is that you have a really old version of the dll somewhere else on your system that java is finding, either in your jdk, your windows folders (I think it checks windows windows/system and windows/system32) so search your whole machine for the dll. If there are no others then somehow you must have really old source for the c code, but newer java.

Hope that helps

Endolf

I am using the precompiled dll as I’ve been unable to untangle the #include spaghetti using either dx8 or 9.

All (and I’ve tried a bunch) of the -I’s I’ve tried to get dinput.h to lead to a valid bunch of includes has failed.

Any clues on that front?

Thanks,
Dale.

Hi
The first time I built Jinput I just followed this instructions, got mingw, the dx bindings etc, and it worked. Are you using VC, or trying to use some other compiler?

It sounds like the binary dll you have is really old, i’d get a new one from https://games-binaries.dev.java.net/build/index.html and try again if I were you.

Cheers

Endolf