Class GFLauncherUtils
- java.lang.Object
-
- com.sun.enterprise.universal.glassfish.GFLauncherUtils
-
public class GFLauncherUtils extends Object
Package private static utility methods- Author:
- bnevins
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
fileListToPathString(List<File> files)
static String
getCanonicalHostName()
Deprecated.static File
getInstallDir()
static boolean
isRelativePath(String path)
Makes an educated guess on whether an arbitrary string is a relative path.static boolean
isWindows()
static boolean
ok(String s)
static String
replace(String s, String token, String replace)
Deprecated.Now part ofString
since JDK 1.5static boolean
safeExists(File f)
static boolean
safeIsDirectory(File f)
static List<File>
stringToFiles(String cp)
Convert a classpath like string, e.g.
-
-
-
Method Detail
-
ok
public static boolean ok(String s)
-
safeExists
public static boolean safeExists(File f)
-
safeIsDirectory
public static boolean safeIsDirectory(File f)
-
getInstallDir
public static File getInstallDir()
-
isWindows
public static boolean isWindows()
-
getCanonicalHostName
@Deprecated public static String getCanonicalHostName() throws UnknownHostException
Deprecated.This method returns the fully qualified name of the host. If the name can't be resolved (on windows if there isn't a domain specified), just host name is returned- Returns:
- Throws:
UnknownHostException
- so it can be handled on a case by case basis- See Also:
NetUtils.getCanonicalHostName()
-
replace
@Deprecated public static String replace(String s, String token, String replace)
Deprecated.Now part ofString
since JDK 1.5
-
isRelativePath
public static boolean isRelativePath(String path)
Makes an educated guess on whether an arbitrary string is a relative path. If the string really is a path, it should be 100% accurate. If it is an arbitrary string like, say, "hello/./world", then it will say that it is a relative path.- Parameters:
path
- the path to check- Returns:
- true if the path is probably relative
-
stringToFiles
public static List<File> stringToFiles(String cp)
Convert a classpath like string, e.g. c:/a;c:/b, and convert to List of File- Parameters:
cp
- The classpath-like string- Returns:
- the list of File
-
-