public static List getClasspathDirectories ( ) { List directories = new ArrayList ( ) ; List components = getClasspathComponents ( ) ; for ( Iterator i = components . iterator ( ) ; i . hasNext ( ) ; ) { String possibleDir = ( String ) i . next ( ) ; File file = new File ( possibleDir ) ; if ( file . isDirectory ( ) ) { directories . add ( possibleDir ) ; } } List tomcatPaths = getTomcatPaths ( ) ; if ( tomcatPaths != null ) { directories . addAll ( tomcatPaths ) ; } return directories ; }
Returns the classpath as a list of directories . Any classpath component that is not a directory will be ignored .