Class ClassPathUtil

java.lang.Object
edu.umd.cs.findbugs.util.ClassPathUtil

public class ClassPathUtil extends Object
Some utility methods for working with the Java class path.
Author:
David Hovemeyer
  • Constructor Details

    • ClassPathUtil

      public ClassPathUtil()
  • Method Details

    • findCodeBaseInClassPath

      public static String findCodeBaseInClassPath(@Nonnull String codeBaseName, String classPath)
      Try to find a codebase with the given name in the given class path string.
      Parameters:
      codeBaseName - name of a codebase (e.g., "findbugs.jar")
      classPath - a classpath
      Returns:
      full path of named codebase, or null if the codebase couldn't be found
    • findCodeBaseInClassPath

      public static String findCodeBaseInClassPath(Pattern codeBaseNamePattern, String classPath)
      Try to find a codebase matching the given pattern in the given class path string.
      Parameters:
      codeBaseNamePattern - pattern describing a codebase (e.g., compiled from the regex "findbugs\\.jar$")
      classPath - a classpath
      Returns:
      full path of named codebase, or null if the codebase couldn't be found
    • getJavaClassPath

      public static String[] getJavaClassPath()