Here you can find the source of getResourceFilePath(String name)
public static String getResourceFilePath(String name)
//package com.java2s; import java.net.URL; public class Main { public static String getResourceFilePath(String name) { ClassLoader loader = ClassLoader.getSystemClassLoader(); URL url = loader.getResource(name); if (url == null) { throw new RuntimeException("File does not exist: " + name); }//from w w w.java2 s . c om return url.getFile(); } }