Here you can find the source of findFile(String filename)
final public static File findFile(String filename)
//package com.java2s; /* /*from w w w . ja v a 2s.c om*/ GeoGebra - Dynamic Mathematics for Everyone http://www.geogebra.org This file is part of GeoGebra. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. */ import java.io.File; import java.net.URL; public class Main { /** * searches the classpath for a filename and returns a File object */ final public static File findFile(String filename) { // search file URL url = ClassLoader.getSystemResource(filename); return new File(url.getFile()); } }