--- plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java.orig 2011-02-20 07:11:41.000000000 -0700 +++ plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java 2014-03-17 21:00:00.000000000 -0600 @@ -42,8 +42,7 @@ * @author Jeremy Booth (jeremy@newdawnsoftware.com) */ public final class LinuxEnvironmentPlugin extends ControllerEnvironment implements Plugin { - private final static String LIBNAME = "jinput-linux"; - private final static String POSTFIX64BIT = "64"; + private final static String LIBNAME = "/jinput/libjinput.so"; private static boolean supported = false; private final Controller[] controllers; @@ -61,16 +60,16 @@ AccessController.doPrivileged( new PrivilegedAction() { public final Object run() { - String lib_path = System.getProperty("net.java.games.input.librarypath"); try { - if (lib_path != null) - System.load(lib_path + File.separator + System.mapLibraryName(lib_name)); - else - System.loadLibrary(lib_name); - } catch (UnsatisfiedLinkError e) { - logln("Failed to load library: " + e.getMessage()); - e.printStackTrace(); - supported = false; + System.load("/usr/lib64" + LIBNAME); + } catch (Exception d) { + try { + System.load("/usr/lib" + LIBNAME); + } catch (Exception e) { + logln("Failed to load library: " + e.getMessage()); + e.printStackTrace(); + supported = false; + } } return null; } @@ -97,12 +96,8 @@ static { String osName = getPrivilegedProperty("os.name", "").trim(); if(osName.equals("Linux")) { - supported = true; - if("i386".equals(getPrivilegedProperty("os.arch"))) { - loadLibrary(LIBNAME); - } else { - loadLibrary(LIBNAME + POSTFIX64BIT); - } + supported = true; + loadLibrary(LIBNAME); } }