Here you can find the source of getResourceFile(String relativeResourceFilePathname)
Parameter | Description |
---|---|
relativeResourceFilePathname | a relative path of a resource without a leading '/': resources/relativeResourceFilePathname. |
public static File getResourceFile(String relativeResourceFilePathname) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.*; import static com.google.common.io.Resources.*; public class Main { /**//from w w w . ja v a 2 s.c o m * @param relativeResourceFilePathname a relative path of a resource without a leading '/': resources/relativeResourceFilePathname. * @return the resource file. */ public static File getResourceFile(String relativeResourceFilePathname) throws Exception { return new File(getResource(relativeResourceFilePathname).toURI()); } }