summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/launcher
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-06 11:37:55 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-06 11:37:55 +0000
commit2794acf3d9824b28336445026e4a3b437b779f75 (patch)
tree3a51820e2898b2a8a5de8f60a9767bcfd18d8f66 /java/sca/modules/launcher
parent1602367641827b9c87ce52ba17acaaff7ca2f11b (diff)
Update config files for logging properties files based on the install location
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741543 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/launcher')
-rw-r--r--java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java b/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java
index 04f2d0b906..35e6060d0f 100644
--- a/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java
+++ b/java/sca/modules/launcher/src/main/java/org/apache/tuscany/sca/launcher/LauncherMain.java
@@ -55,15 +55,22 @@ public class LauncherMain {
invokeMainMethod(mainClassName, classLoader, mainArgs);
}
- private static void setSystemProperties(Properties launcherProperties) {
+ private static void setSystemProperties(Properties launcherProperties) throws URISyntaxException {
for (Enumeration<?> e = launcherProperties.propertyNames(); e.hasMoreElements();) {
String pn = (String) e.nextElement();
if (pn.startsWith("-D")) {
- System.setProperty(pn.substring(2), launcherProperties.getProperty(pn));
+ System.setProperty(pn.substring(2), keywordExpand(launcherProperties.getProperty(pn)));
}
}
}
+ private static String keywordExpand(String property) throws URISyntaxException {
+ if (property.contains("{TUSCANY_HOME}")) {
+ property = property.replace("{TUSCANY_HOME}", getLauncherFolder().getParentFile().getAbsolutePath());
+ }
+ return property;
+ }
+
private static String[] getMainArgs(Properties launcherProperties) {
String[] mainArgs = (String[])launcherProperties.get(LAUNCHER_ARGS);
if (mainArgs == null) {