how does the java-compiler know, that an exception is a RuntimeException. As far as i know there is no special interface, etc that seperates the RuntimeExceptions from usual Exceptions. Does it distinguish them by name or how does this work?
A Java compiler has to find a .java or .class file for every class (including exceptions) mentioned in a program it is compiling. Given the .class file, it can find out the superclass, and the superclass of that class... An exception type is unchecked if the compiler finds java.lang.RuntimeException or java.lang.Error in the tree of superclasses.