why cannot declare throw exception class?
<pre><code>package com.csl.bps.util;

import java.awt.Event;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.HashMap;

import javax.servlet.ServletContextEvent;

public class Reloader implements Runnable{
    private boolean firstLoad = true;
    private ServletContextEvent eventCopy = null;
    private File configFile = null;
    private String configFilePath = null;
    private HashMap map = null;
    private BufferedReader reader = null;
    private long lastModifiedTime = 0;
    public Reloader(ServletContextEvent event) {
        eventCopy = event;
        //event.getServletContext().setAttribute("i", new Integer(2));
    }

    public void run() {
        configFilePath = (String)eventCopy.getServletContext().getInitParameter("billRunDetailConfig");
        if(configFilePath == null)
        {
            eventCopy.getServletContext().log("Warning: No bill run detail config file found. Please check the file and restart.");
        }
        configFile = new File(configFilePath);
        if(firstLoad == true)
        {
            map = createMap(configFile);
            lastModifiedTime = configFile.lastModified();
            eventCopy.getServletContext().setAttribute("BunRunDetail", map);
            eventCopy.getServletContext().log("\n\nFirst load of bill run detail config file. HashMap loaded.\n");
            firstLoad = false;
        }
        else
        {
            eventCopy.getServletContext().log("\n\nAnother load of bill run detail config file. Checking for the file's last modified time...\n");
            if(configFile.lastModified() != lastModifiedTime)
            {
                map = createMap(configFile);
                lastModifiedTime = configFile.lastModified();
                eventCopy.getServletContext().setAttribute("BunRunDetail", map);
                eventCopy.getServletContext().log("Config file changed. HashMap is hashed again.");
            }else
            {   
                eventCopy.getServletContext().log("Config file is not changed.");
            }
        }
    }

    private HashMap createMap(File configFile){
        HashMap map = null;
        try{
            reader = new BufferedReader(new FileReader(configFile));
        }catch(FileNotFoundException ex){
            ex.printStackTrace();
        }
        return map;
    }
}
</code></pre>

<p>I would like throw any exception to the caller of any method, but I cannot, for example:
I can do this:</p>

<pre><code>private HashMap createMap(File configFile) throws FileNotFoundException{
    HashMap map = null;
    try{
        reader = new BufferedReader(new FileReader(configFile));
    }catch(FileNotFoundException ex){
        //ex.printStackTrace();
        throw ex;
    }
    return map;
}
</code></pre>

<p>But in the above:</p>

<pre><code>if(firstLoad == true)
{
    map = createMap(configFile);
    lastModifiedTime = configFile.lastModified();
    eventCopy.getServletContext().setAttribute("BunRunDetail", map);
    eventCopy.getServletContext().log("\n\nFirst load of bill run detail config file. HashMap loaded.\n");
    firstLoad = false;
}
</code></pre>

<p>Here in the line of <code>map = createMap(configFile)</code> I got a prompt error in eclipse for a not handled exception, but I can only add a try catch clause to it.</p>

<p>I would like it to throw the exception to its caller, and let the caller handle the exception, because if I return in here, I am not sure if all of the resource are close.</p>

<hr>

<p><strong>Why does its signature doesn't contain a throws clause? Does it assumeit won't produce any exception?</strong></p>

<p><strong>If an exception appear, and I wrap it with a try/catch clause, will the thread stop and notify the parent?</strong></p>
