Index: src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java,v
retrieving revision 1.5
diff -u -r1.5 JavaLanguage.java
--- src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java	2001/08/20 13:55:11	1.5
+++ src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java	2001/08/21 14:40:17
@@ -25,6 +25,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
+import java.util.StringTokenizer;
 
 /**
  * The Java programming language processor
@@ -275,18 +276,32 @@
     return buffer.toString();
   }
 
-  private String expandDirs(String d) throws LanguageException {
-    File dir = new File(d);
-    if ( ! dir.isDirectory() ) {
-        throw new LanguageException(
-            "Attempted to retrieve directory listing of non-directory "
-            + dir.toString()
-        );
-    }
-    File[] files = dir.listFiles(new JavaArchiveFilter());
+  /**
+   * Expand a directory path or list of directory paths (File.pathSeparator
+   * delimited) into a list of file paths of all the jar files in those
+   * directories.
+   *
+   * @param dirPaths The string containing the directory path or list of
+   * 		directory paths.
+   * @return The file paths of the jar files in the directories. This is an
+   *		empty string if no files were found, and is terminated by an
+   *		additional pathSeparator in all other cases.
+   */
+  private String expandDirs(String dirPaths) throws LanguageException {
+    StringTokenizer st = new StringTokenizer(dirPaths, File.pathSeparator);
     StringBuffer buffer = new StringBuffer();
-    for (int i = 0; i < files.length; i++) {
-        buffer.append(files[i]).append(File.pathSeparator);
+    while (st.hasMoreTokens()) {
+        String d = st.nextToken();
+        File dir = new File(d);
+        if ( ! dir.isDirectory() ) {
+            // The absence of a listed directory may not be an error.
+            if (getLogger().isWarnEnabled()) getLogger().warn("Attempted to retrieve directory listing of non-directory " + dir.toString());
+        } else {
+            File[] files = dir.listFiles(new JavaArchiveFilter());
+            for (int i = 0; i < files.length; i++) {
+                buffer.append(files[i]).append(File.pathSeparator);
+            }
+        }
     }
     return buffer.toString();
   }
