Description
In Java 9 we get modules, so the bootclasspath is no longer useful. We added support for the new URL style of class loader URLs using "jrt:" URIs, but the check for runtime classes just uses this protocol prefix to define that a class is coming from the runtime.
This is not 100% correct, in later stages of the JDK9 development, the JAR file format will be "depecated", too. Application classes will then be loaded from jrt: URLs, too (I was talking with Brian Goetz about this).
To correctly detect classes form the runtime, we need to maintain a list of module names/patterns (like the list of packages) containing stuff like "java.", "jdk." and so on. If a class resolves to an URL with this modules in the URL, we can assume that its a runtime class. The current code may also detect classes from outside the JVM as runtime classes (if the application code is installed as a module).