--- old/src/share/vm/memory/filemap.cpp 2016-09-29 15:57:17.453001055 -0700 +++ new/src/share/vm/memory/filemap.cpp 2016-09-29 15:57:17.329992404 -0700 @@ -263,7 +263,7 @@ } else { struct stat st; if (os::stat(name, &st) == 0) { - if ((st.st_mode & S_IFDIR) == S_IFDIR) { + if ((st.st_mode & S_IFMT) == S_IFDIR) { if (!os::dir_is_empty(name)) { ClassLoader::exit_with_path_failure( "Cannot have non-empty directory in archived classpaths", name);