Code example for FileNotFoundException

	private File getFile(File parent, String path) throws IOException {
		File file = new File(parent, path);
		if (!file.exists()) {
			throw new FileNotFoundException(path + " doesn't exist");
		return file;
	public File getEclipseJdtCorePrefs() throws IOException {
		return getResource("org.eclipse.jdt.core.prefs"); 
	public File getProjectPropertiesFile() throws IOException {
		return getResource(""); 
	public File getLibraryFile(String filename) throws IOException {
		return getResource("libs/" + filename);
Connect your IDE to all the code out there  Get Codota for Java