public class JarUtils extends Object
Constructor and Description |
---|
JarUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getRtJarPath()
Get the path of rt.jar
|
static boolean |
isJar(String path)
Returns true if the path ends with a jarfile extension, ignoring case.
|
static boolean |
isJREJar(String filePath,
LogNode log)
Determine whether a given jarfile is in a JRE system directory (jre, jre/lib, jre/lib/ext, etc.).
|
static String |
leafName(String path)
Returns the leafname of a path.
|
static void |
logJavaInfo(LogNode log)
Log the Java version and the JRE paths that were found.
|
static String[] |
smartPathSplit(String pathStr)
Split a path on File.pathSeparator (':' on Linux, ';' on Windows), but also allow for the use of URLs with
protocol specifiers, e.g.
|
public static String[] smartPathSplit(String pathStr)
public static String getRtJarPath()
public static void logJavaInfo(LogNode log)
public static boolean isJREJar(String filePath, LogNode log)
public static boolean isJar(String path)
Copyright © 2017. All rights reserved.