In Java, how do you find the path to the jar of the currently running program, and to the rt.jar now in use by the currently running program?
(The context is a compiler targeting the JVM, which needs to look at these jars in order to resolve import statements, class references etc.)