Class GFLauncherUtils

java.lang.Object
com.sun.enterprise.universal.glassfish.GFLauncherUtils

public class GFLauncherUtils extends Object
Package private static utility methods
Author:
bnevins
  • Method Details

    • 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
    • replace

      public static String replace(String s, String token, String replace)
    • 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
    • fileListToPathString

      public static String fileListToPathString(List<File> files)