Class SystemJarFinder
java.lang.Object
nonapi.io.github.classgraph.classpath.SystemJarFinder
A class to find rt.jar and any JRE "lib/" or "ext/" jars.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe paths of any "lib/" or "ext/" jars found in the JRE.private static final StringThe path of the first "rt.jar" found.The paths of any "rt.jar" files found in the JRE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanaddJREPath(File dir) Add and search a JRE path.Get the JRE "lib/" and "ext/" jar paths.static StringGet the JRE "rt.jar" path.
-
Field Details
-
RT_JARS
-
RT_JAR
The path of the first "rt.jar" found. -
JRE_LIB_OR_EXT_JARS
-
-
Constructor Details
-
SystemJarFinder
private SystemJarFinder()Constructor.
-
-
Method Details
-
addJREPath
Add and search a JRE path.- Parameters:
dir- the JRE directory- Returns:
- true if the directory was readable.
-
getJreRtJarPath
Get the JRE "rt.jar" path.- Returns:
- The path of rt.jar (in JDK 7 or 8), or null if it wasn't found (e.g. in JDK 9+).
-
getJreLibOrExtJars
-