Here you can find the source of getTestResourceFile(String pName, Class pClass)
public static File getTestResourceFile(String pName, Class pClass)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.net.URL; public class Main { public static File getTestResourceFile(String pName, Class pClass) { URL lFile = pClass.getResource(pName); return new File(lFile.getFile()); }/* w w w . ja v a 2s. c om*/ }