static Resource getSingleResource(final String targetResourceName, final String category) {
        if (category == null) {
            throw new NullPointerException("SelfContainedJarFiles.getSingleResources received null.");
        }
        final List<String> jarResourceNames = JAR_RESOURCE_NAMES.get(category);
        if (jarResourceNames == null) {
            throw new IllegalArgumentException(
                    "SelfContainedJarFiles.getSingleResources received unexpected category: " + category);
        }

        String foundJarResourceName = null;
        Resource resourceToReturn = null;
        for (final String jarResourceName : jarResourceNames) {
            final SelfContainedJarFile selfContainedJarFile = Holder.INSTANCE.get(jarResourceName);
            final Resource resourceFound = selfContainedJarFile.getResource(targetResourceName);
            if (resourceFound != null) {
                if (resourceToReturn != null) {
                    throw new LinkageError(String.format("Duplicated resource: '%s' in '%s' v.s. '%s'", targetResourceName, foundJarResourceName, jarResourceName));
                }
                foundJarResourceName = jarResourceName;
                resourceToReturn = resourceFound;
            }
        }
        return resourceToReturn;
    }
It must be called initially at once before all other getResource*() methods are called.

public to be called from org.embulk.cli. Not for plugins. Not guaranteed.
embulk-core/src/main/java/org/embulk/cli/SelfContainedJarFiles.java