Author: burn
Date: Thu May 23 00:15:51 2013
New Revision: 1485517

URL: http://svn.apache.org/r1485517
Log:
UIMA-2879 Make all-in-one use the complete DUCC path saved in 
state/ducc.classpath

Modified:
    
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/aio/AllInOneLauncher.java

Modified: 
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/aio/AllInOneLauncher.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/aio/AllInOneLauncher.java?rev=1485517&r1=1485516&r2=1485517&view=diff
==============================================================================
--- 
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/aio/AllInOneLauncher.java
 (original)
+++ 
uima/sandbox/uima-ducc/trunk/uima-ducc-cli/src/main/java/org/apache/uima/ducc/cli/aio/AllInOneLauncher.java
 Thu May 23 00:15:51 2013
@@ -20,6 +20,7 @@ package org.apache.uima.ducc.cli.aio;
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -893,14 +894,16 @@ public class AllInOneLauncher extends Cl
         mh.frameworkTrace(cid, mid, "exit");
     }
     
+    // Get the classpath saved when DUCC is started
     private String getDuccClasspath() throws IOException {
-        StringBuilder sb = new StringBuilder();
-        File uimalib = new File(ducc_home + "/lib/uima");
-        for (File f : uimalib.listFiles()) {
-            sb.append(File.pathSeparator);
-            sb.append(f.getCanonicalPath());
+        BufferedReader in = new BufferedReader(new FileReader(ducc_home + 
"/state/ducc.classpath"));
+        String path = in.readLine();
+        in.close();
+        if (path.charAt(0) == ':') {
+            return path.substring(1);
+        } else {
+            return path;
         }
-        return sb.substring(2);
     }
     
     private void launch_local() throws IOException {


Reply via email to