java.lang.UnsatisfiedLinkError: no jinput-linux64 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at net.java.games.input.LinuxEnvironmentPlugin$1.run(LinuxEnvironmentPlugin.java:66) at java.security.AccessController.doPrivileged(Native Method) at net.java.games.input.LinuxEnvironmentPlugin.loadLibrary(LinuxEnvironmentPlugin.java:58) at net.java.games.input.LinuxEnvironmentPlugin.<clinit>(LinuxEnvironmentPlugin.java:101) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:159) at net.java.games.input.test.ControllerReadTest.<init>(ControllerReadTest.java:252) at net.java.games.input.test.ControllerReadTest.main(ControllerReadTest.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.javaws.Launcher.executeApplication(Launcher.java:1799) at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1745) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1507) at com.sun.javaws.Launcher.run(Launcher.java:129) at java.lang.Thread.run(Thread.java:619)14 déc. 2010 11:52:09 net.java.games.input.ControllerEnvironment logINFO: net.java.games.input.LinuxEnvironmentPlugin is not supported

The webstart demo is probably a fair bit out of date, I will take a look and see at some point. Looking at SMFL, it doesn't support rumblers, which JInput does, it needs read access to /dev/input/js* devices, but most distros give this as it's not considered insecure. JInput should offer the same functionality (ie, less) if it can't read the /dev/input/event* nodes as SMFL does (no mouse, no keyboard, joysticks only and no rumbler support).

Sorry to ressurect this old thread. The Web Start demo does not work even now. Where can I find a working demo of JInput?

Does JInput work fine when it has a read access on /dev/input/event* and /dev/input/js*? Is there an elegant way of doing a chmod in Java otherwise? Could I use PosixFileAttributeView.setPermissions(Set<PosixFilePermission> perms) to do it?

I plan to use JInput in my first person shooter because I would like to support controllers.

java.lang.UnsatisfiedLinkError: no jinput-linux64 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at net.java.games.input.LinuxEnvironmentPlugin$1.run(LinuxEnvironmentPlugin.java:69) at java.security.AccessController.doPrivileged(Native Method) at net.java.games.input.LinuxEnvironmentPlugin.loadLibrary(LinuxEnvironmentPlugin.java:61) at net.java.games.input.LinuxEnvironmentPlugin.<clinit>(LinuxEnvironmentPlugin.java:104) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:159) at net.java.games.input.test.ControllerReadTest.<init>(ControllerReadTest.java:253) at net.java.games.input.test.ControllerReadTest.main(ControllerReadTest.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.javaws.Launcher.executeApplication(Launcher.java:1809) at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1750) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1512) at com.sun.javaws.Launcher.run(Launcher.java:130) at java.lang.Thread.run(Thread.java:662)Aug 1, 2011 12:59:29 PM net.java.games.input.ControllerEnvironment logINFO: net.java.games.input.LinuxEnvironmentPlugin is not supported

It's the values that are important, in the jnlp it has x32_64 or something IIRC for 64 bit linux, but if that is not what is being checked, then it won't work. So I just need to confirm the values you are seeing.

I have just tested the JNLP file of JOGL 1.1.1a and it gets the JAR containing native libraries unlike your JNLP file. If you use x86_64, it will not work here but maybe with another JVM. You can detect both x86_64 and amd64 but point them to the same JAR containing the native dependencies, it will work fine.

Agreed, that's exactly what I was checking for when I asked for information on the properties, but I wanted to confirm that was the issue before changing anything, so can you confirm the contents of your properties that java holds.

Agreed, that's exactly what I was checking for when I asked for information on the properties, but I wanted to confirm that was the issue before changing anything, so can you confirm the contents of your properties that java holds.

I will test JInput on some other machines with Linux, I hope that only a very few of them require a modification of file access.

My experience is that js devices are fine, the rest are normally not even readable by default. Which sucks, but such is life in linux it seems.

Quote

Is it possible to use plain AWT for the keyboard and JInput for the controllers?

Yes, there is an AWT plugin provided, with all the limitations that brings (no support for multiple mice/keyboards as seperate controllers, no input when not in the application window for mouse/keyboard). As long as that is ok, then you can use that plugin. The details for how to change plugins should be on the forum somewhere

Actually, I would like to use plain AWT to handle the keyboard in Ardor3D and JInput to handle the controllers. I worked a lot on a way of finding an equivalent of default keys for a first person shooter on non-QWERTY keyboards (WSAD); I don't want to rewrite everything.

java.lang.UnsatisfiedLinkError: .java/deployment/cache/6.0/15/307218f-3999fd85-n/libjinput-linux64.so: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by .java/deployment/cache/6.0/15/307218f-3999fd85-n/libjinput-linux64.so)

Ok, so the version of glibc jinput was compiled against was 2.7 and you have a different version. Without statically linking the whole of glibc in to jinput, I'm not sure what can be done (I confess I've not explored thoroughly).

Any ideas?, otherwise you might have to compile jinput libs yourself. It's one of the joys of linux as I understand it.

Statically linking the whole glibc would solve my problem. I cannot compile JInput with each version of glibc. How are such things done in LWJGL? I don't have such errors with LWJGL and JogAmp (JOGL, JOAL, JOCL, etc...).

Ok, so they do the same as JInput does, the only difference is their build machine is still on an older version of libc. The build farm JInput uses is not exclusively for JInputs use, and I had to upgrade the distribution for another build. I will take a look at the possibility of rolling libc back, or installing an older version in parallel for building against, but I don't know when I'll have time to do this.

My best suggestion currently is for you to build the linux binaries on an old enough version of libc to cover your target user base. Users on newer version will still be fine on that.

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