private static String getResourceFile(String resource) {
            URL resourceUrl = Application.class.getResource(resource);
            if (resourceUrl == null || resourceUrl.getFile() == null || resourceUrl.getFile().isEmpty()) {
                throw new RuntimeException("Could not access resource: " + resource);
            }

            return resourceUrl.getFile();
        }
Get the file name (path) of a resource or fail if it can not be found

@param resource Name of desired resource
@return Path of resource
application/src/main/java/com/yahoo/application/Application.java