Here you can find the source of getFileFullPath(String file)
public static String getFileFullPath(String file)
//package com.java2s; //License from project: Apache License import java.io.File; import java.net.URL; public class Main { public static String getFileFullPath(String file) { String path = ResourcePath(file); File fileTmp = new File(path); if (fileTmp.exists()) { return path; }/* www . j a v a 2 s .c om*/ return null; } public static String ResourcePath(String name) { URL url = Thread.currentThread().getContextClassLoader().getResource(name); if (url != null) { return url.getPath(); } return name; } }