I use the system property java.class.path
to find all jars and directories that belong to the classpath. At first sigth this seems to work great. But on closer inspection I found that when I execute my program with gradle there is no rt.jar
in this classpath. When executed from IntelliJ IDEA ´rt.jar´ is part of that class.
Why do the classpaths between IntelliJ and Gradle differ in this way?
Just to be clear: All the classes contained in rt.jar
get loaded just fine, it is just the property that is confusing me.