+ // Build command
+ List cmdList = new ArrayList();
+
+ // System properties
+ if (!systemProperties.containsKey("osgi.bundles")) {
+ if (locationsStruct.osgiBootArtifact == null)
+ throw new Exception("No SLC OSGi boot bundle available.");
+ System.setProperty("osgi.bundles", locationsStruct.osgiBootArtifact
+ .getFile().getCanonicalPath()
+ + "@start");
+ }
+
+ if (!systemProperties.containsKey("slc.osgi.locations"))
+ System.setProperty("slc.osgi.locations",
+ locationsStruct.osgiLocations);
+
+ for (Iterator keys = systemProperties.keySet().iterator(); keys
+ .hasNext();) {
+ Object key = keys.next();
+ Object value = systemProperties.get(key);
+ String strValue = null;
+ if (value != null) {
+ strValue = value.toString().trim();
+ strValue = strValue.replaceAll("\n", "");
+ strValue = strValue.replaceAll("\t", "");
+ }
+ System.setProperty(key.toString(), strValue);
+ }
+
+ // Program arguments
+ cmdList.addAll(Arrays.asList(args));
+ if (argsToAppend != null)
+ cmdList.addAll(Arrays.asList(argsToAppend));
+
+ String[] cmd = (String[]) cmdList.toArray(new String[0]);
+ System.out.println("Equinox arguments (non forked):");
+ printCommand(cmd);
+
+ EclipseStarter.startup(cmd, null);
+
+ if (wait) {
+ while (EclipseStarter.isRunning()) {
+ Thread.sleep(500);
+ }
+ } else {
+ Thread.sleep(pause);
+ }
+ }
+
+ protected void execForked(LocationsStruct locationsStruct) throws Exception {
+ // Set defaults
+ if (jvmArgs == null)
+ jvmArgs = defaultJvmArgs;
+ if (args == null)
+ args = defaultArgs;
+ if (systemProperties == null)
+ systemProperties = new HashMap();
+
+ if (!execDir.exists())
+ execDir.mkdirs();
+
+ // Build command
+ List cmdList = new ArrayList();
+ // JVM
+ cmdList.add(jvm);
+ // JVM arguments
+ cmdList.addAll(Arrays.asList(jvmArgs));
+
+ if (!"0".equals(debug))
+ cmdList
+ .add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address="
+ + debug);
+
+ if (jvmArgsToAppend != null)
+ cmdList.addAll(Arrays.asList(jvmArgsToAppend));
+
+ // System properties
+ if (!systemProperties.containsKey("osgi.bundles"))