public static File getJarForNativeLibrary(Platform platform, String name) {
        NativeLibrary library = nativeLibraryMap.get(new NativeLibrary.Key(name, platform));
        if (library == null) {
            return null;
        }

        String pathInJar = library.getPathInNativesJar();
        if (pathInJar == null) {
            return null;
        }
        
        String fileNameInJar;
        if (pathInJar.contains("/")) {
            fileNameInJar = pathInJar.substring(pathInJar.lastIndexOf("/") + 1);
        } else {
            fileNameInJar = pathInJar;
        }
        
        URL url = Resources.getResource(pathInJar);
        if (url == null) {
            url = Resources.getResource(fileNameInJar);
        }
        
        if (url == null) {
            return null;
        }
        
        StringBuilder sb = new StringBuilder(url.toString());
        if (sb.indexOf("jar:file:/") == 0) {
            sb.delete(0, 9);
            sb.delete(sb.indexOf("!"), sb.length());
            return new File(sb.toString());
        } else {
            return null; // not a jar
        }
    }
Removes platform-specific portions of a library file name so
that it can be accepted by {@link System#loadLibrary(java.lang.String) }.
<p>
E.g.<br>
<ul>
<li>jinput-dx8_64.dll => jinput-dx8_64</li>
<li>liblwjgl64.so => lwjgl64</li>
<li>libopenal.so => openal</li>
</ul>

@param filename The filename to strip platform-specific parts
@return The stripped library name
jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java