private boolean isJarFormat(File jarFile) throws IOException {
		JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFile));
		JarEntry entry = jarIn.getNextJarEntry();

		// the next entry should be JAR_FORMAT
		entry = jarIn.getNextJarEntry();
		String format = entry.getName();
		jarIn.close();

		if (format.equalsIgnoreCase(ArchivePlugin.JAR_VERSION_TAG)) {
			return true;
		}
		return false;
	}
menu listener for File | Restore Archive ...
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java