def expand_to_class_path(path)
      # the path separator
      sep = path[WINDOWS_PATH_SEP] ? WINDOWS_PATH_SEP : UNIX_PATH_SEP
      # the path directories
      dirs = path.split(sep).map { |dir| File.expand_path(dir) }
      expanded = expand_jars(dirs)
      expanded.each { |dir| add_to_classpath(dir) }
    end
def expand_to_class_path(path)
      # the path separator
      sep = path[WINDOWS_PATH_SEP] ? WINDOWS_PATH_SEP : UNIX_PATH_SEP
      # the path directories
      dirs = path.split(sep).map { |dir| File.expand_path(dir) }
      expanded = expand_jars(dirs)
      expanded.each { |dir| add_to_classpath(dir) }
    end
Adds the directories in the given path and all Java jar files contained in
 the directories to the Java classpath.

 @quirk Java The jar files found by this method are added to the classpath
 in sort order. Java applications usually add jars in sort order. For examle,
 the Apache Ant directory-based classpath tasks are in sort order, although
 this is not stipulated in the documentation. Well-behaved Java libraries are
 not dependent on the sort order of included jar files. For poorly-behaved
 Java libraries, ensure that the classpath is in the expected order. If the
 classpath must be in a non-sorted order, then call {#add_to_classpath}
 on each jar file instead.

 @param [String] path the colon or semi-colon separated directories