i’m using mind2machine compiled binary of jinput.
i get error with following code
ControllerEnvironment ce =
ControllerEnvironment.getDefaultEnvironment();
Controller[] ca = ce.getControllers();
for (int i = 0; i < ca.length; i++)
{
Controller cont = ca[i];
System.out.println(cont.getName());
}
and error is
java.lang.NullPointerException
at net.java.games.util.plugins.Plugins.scanPlugins(Plugins.java:78)
at net.java.games.util.plugins.Plugins.<init>(Plugins.java:73)
at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(D
efaultControllerEnvironment.java:170)
at net.java.games.input.DefaultControllerEnvironment.scanControllers(Def
aultControllerEnvironment.java:162)
at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultC
ontrollerEnvironment.java:57)
at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultContro
llerEnvironment.java:108)
at java.security.AccessController.doPrivileged(Native Method)
at net.java.games.input.DefaultControllerEnvironment.getControllers(Defa
ultControllerEnvironment.java:106)
what’s causing this?
i’m currently trying to build jinput with mingw but the project main page say’s that i need dx8lib’s but doesn’t say where to put them,also i’m quite lost how to get the native code to build,root ant build file doesn’t do that.