public static String getPathForResource ( final String resourcePath ) { URL path = ResourceUtil . class . getResource ( resourcePath ) ; if ( path == null ) { path = ResourceUtil . class . getResource ( "/" ) ; File tmpFile = new File ( path . getPath ( ) , resourcePath ) ; return tmpFile . getPath ( ) ; } return path . getPath ( ) ; }
Convert a resource path to an absolute file path .