Here you can find the source of getSystemResource(String path)
public static File getSystemResource(String path) throws FileNotFoundException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileNotFoundException; import java.net.URISyntaxException; import java.net.URL; public class Main { private static ClassLoader classLoader; public static File getSystemResource(String path) throws FileNotFoundException { try {//ww w . j a va2 s.c o m URL url = classLoader.getResource(path); if (url != null) { return new File(url.toURI()); } else { throw new FileNotFoundException(path); } } catch (URISyntaxException e) { throw new RuntimeException(e); } } }