private static int computeNativesHash() {
        URLConnection conn = null;
        String classpath = System.getProperty("java.class.path");
        URL url = Resources.getResource("com/jme3/system/NativeLibraryLoader.class");

        try {
            StringBuilder sb = new StringBuilder(url.toString());
            if (sb.indexOf("jar:") == 0) {
                sb.delete(0, 4);
                sb.delete(sb.indexOf("!"), sb.length());
                sb.delete(sb.lastIndexOf("/") + 1, sb.length());
            }
            try {
                url = new URL(sb.toString());
            } catch (MalformedURLException ex) {
                throw new UnsupportedOperationException(ex);
            }

            conn = url.openConnection();
            int hash = classpath.hashCode() ^ (int) conn.getLastModified();
            return hash;
        } catch (IOException ex) {
            throw new UncheckedIOException("Failed to open file: '" + url
                    + "'. Error: " + ex, ex);
        } finally {
            if (conn != null) {
                try {
                    conn.getInputStream().close();
                    conn.getOutputStream().close();
                } catch (IOException ex) { }
            }
        }
    }
Determine jME3's cache folder for the user account based on the OS.

If the OS cache folder is missing, the assumption is that this
particular version of the OS does not have a dedicated cache folder,
hence, we use the user's home folder instead as the root.

The folder returned is as follows:<br>
<ul>
<li>Windows: ~\AppData\Local\jme3</li>
<li>Mac OS X: ~/Library/Caches/jme3</li>
<li>Linux: ~/.cache/jme3</li>
</ul>

@return the user cache folder.
jme3-desktop/src/main/java/com/jme3/system/NativeLibraryLoader.java