Eclipse isn't doing anything special here; the issue is in the Java code itself. Your two best options are to change the method's signature to include the throws
, or to catch the exception and rethrow it as a RuntimeException (or subclass of RuntimeException).
try {
doWhatever();
} catch (SomeException e) {
throw new SomeRuntimeException(e);
}
...where SomeException is or extends Exception (but not RuntimeException), and SomeRuntimeException is or extends RuntimeException.
For more info, check out the section in Sun's Java tutorials on checked Exceptions.