private static boolean isZip(Path path) {
        if (!Files.isRegularFile(path)) {
            return false;
        }

        try (ZipFile ignored = new ZipFile(path.toFile())) {
            return true;
        } catch (IOException ignored) {
            // Probably not a JAR file.
            return false;
        }
    }
Returns the {@link Path} to the JAR, WAR or directory where the specified {@link Class} is located at.
core/src/main/java/com/linecorp/armeria/common/util/AppRootFinder.java