public static void main(String[] args) {
        if (args.length == 1) {
            if ("getjarexcludes".equals(args[0])) {
                File[] jarFiles = NativeLibraryLoader.getJarsWithNatives();
                for (int i = 0; i < jarFiles.length; i++) {
                    File jarFile = jarFiles[i];
                    System.out.print("**/*" + jarFile.getName());
                    if (i != jarFiles.length - 1) {
                        System.out.print(",");
                    }
                }
                System.exit(0);
            }
        }
        if (args.length < 2) {
            System.err.println("Usage: ExtractNativeLibraries Platform ExtractionPath");
            System.err.println("Where 'Platform' is either Windows32, Windows64, Linux32, Linux64, MacOSX32 or MacOSX64");
            System.err.println("'ExtractionPath' is a folder to extract the binaries to.");
            System.err.println("You can also use ExtractNativeLibraries getjarexcludes to get a list of excludes for the jar files that contain binaries.");
            System.exit(1);
        }
        String path = args[1].replace('/', File.separatorChar);
        File folder = new File(path);
        try {
            if ("Windows32".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.Windows32, folder);
            } else if ("Windows64".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.Windows64, folder);
            } else if ("Linux32".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.Linux32, folder);
            } else if ("Linux64".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.Linux64, folder);
            } else if ("MacOSX32".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.MacOSX32, folder);
            } else if ("MacOSX64".equals(args[0])) {
                NativeLibraryLoader.extractNativeLibraries(Platform.MacOSX64, folder);
            } else {
                System.err.println("Please specify a platform, Windows32, Windows64, Linux32, Linux64, MacOSX32 or MacOSX64");
                System.exit(3);
            }
        } catch (IOException ex) {
            Logger.getLogger(ExtractNativeLibraries.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
Allows extraction of platform specific binaries from classpath via build
systems.

@author normenhansen
jme3-desktop/src/main/java/com/jme3/system/ExtractNativeLibraries.java