diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-27 16:38:16 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-27 16:38:16 +0000 |
commit | 52ce7df1c3f1076410836b444d95b9da2eb14c28 (patch) | |
tree | e61ddc82957299116f4b02f0fe54be0b379fb695 /branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | |
parent | ced88ce66721126b9d6e4daf0c3325306284ec7f (diff) |
Bring up calculator-osgi using equinox run config
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@708234 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java')
-rw-r--r-- | branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index f16d607a80..6007c0dac2 100644 --- a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -36,6 +36,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -122,12 +123,19 @@ class EquinoxHost { try { if (!EclipseStarter.isRunning()) { + String version = System.getProperty("java.specification.version"); + String profile = "J2SE-1.5.profile"; + if (version.startsWith("1.6")) { + profile = "JavaSE-1.6.profile"; + } + Properties props = new Properties(); + InputStream is = getClass().getResourceAsStream(profile); + if (is != null) { + props.load(is); + is.close(); + } // Configure Eclipse properties - Map<Object, Object> props = new HashMap<Object, Object>(); - // Set system packages - props.put("org.osgi.framework.system.packages", systemPackages); - // Use the boot classloader as the parent classloader props.put("osgi.contextClassLoaderParent", "boot"); |