Java Resource Load getResourceFile(String resourceName)

Here you can find the source of getResourceFile(String resourceName)

Description

get Resource File

License

Open Source License

Declaration

public static File getResourceFile(String resourceName) throws Exception 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static File getResourceFile(String resourceName) throws Exception {
        return new File(ClassLoader.getSystemClassLoader().getResource(resourceName).toURI());
    }/*  w w w  . j  ava 2 s .  c  o  m*/
}

Related

  1. getResourceDirectory()
  2. getResourceFile(Class clazz, String path)
  3. getResourceFile(Class theClass, String fileName)
  4. getResourceFile(String relativeResourceFilePathname)
  5. getResourceFile(String resource)
  6. getResourceFromJar(File fromFile, String insideFile)
  7. getResourceInDirPackage(String packageName, String packagePath, final boolean recursive, List classes)
  8. getResourceList(File fdir, String extn)
  9. getResourceListing(URL pathUrl, String prefix, String suffix)