Here you can find the source of getResourceFile(String resourceName)
public static File getResourceFile(String resourceName) throws Exception
//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*/ }