Add generate script
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 28 Jul 2009 18:24:06 +0000 (18:24 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 28 Jul 2009 18:24:06 +0000 (18:24 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@2827 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/JvmProcess.java
runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/SystemCall.java

index 1dc91bf5d59558af6dde216a5878744cd5ffbfb2..be986f777cbe3695a67ee5d794107b50f1a50ddd 100644 (file)
@@ -30,7 +30,7 @@ public class JvmProcess extends SystemCall implements InitializingBean {
        public void afterPropertiesSet() throws Exception {
                List<Object> command = new ArrayList<Object>();
                if (jvm != null)
-                       command.add(asFile(jvm).getAbsolutePath());
+                       command.add(asFile(jvm).getPath());
                else
                        command.add("java");
 
@@ -108,7 +108,7 @@ public class JvmProcess extends SystemCall implements InitializingBean {
 
        protected File asFile(Resource res) {
                try {
-                       return res.getFile().getCanonicalFile();
+                       return res.getFile();
                } catch (FileNotFoundException e) {
                        return copyToTempFile(res);
                } catch (IOException e) {
index d5470c8822a777504bd62735ea568eeb1f76723f..4d7e5d05dbc8013d7b8d829787bec8cc0b7f3ded 100644 (file)
@@ -198,7 +198,7 @@ public class SystemCall extends TreeSRelatedHelper implements Runnable,
                                        + generateScript);
                        try {
                                FileUtils.writeStringToFile(scriptFile,
-                                               (osConsole != null ? osConsole : "")
+                                               (osConsole != null ? osConsole + " " : "")
                                                                + commandLine.toString());
                        } catch (IOException e) {
                                throw new SlcException("Could not generate script "