Maybe this is a bit off-topic here, but I'm not sure where else I could ask.
Apprently, for Darwin, there are tons of JNI libraries out there which are probably Mach-O files in disguise, but start with the 0xCAFEBABE magic number. Not surprisingly, various class file parser choke on them. Is there are a way, based on the file header, to tell these .jnilib files from genuine Java class files?