The following signature of main method works fine.
public static void main(String[] args) throws Exception {
When I try to use some specific Exception, main method throws exception.
public static void main(String[] args) throws IOException {
Exception:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
IOException cannot be resolved to a type