Skip to content
Browse files

dragonfly: fix startup property file generation in simulator.

  • Loading branch information...
1 parent df6fb3a commit 2fcccd891c0ec21c7e396ad31239446ca81b3d66 @kgilmer kgilmer committed Aug 3, 2011
View
22 ...labs.dragonfly.felix/src/com/buglabs/dragonfly/felix/launch/FelixLaunchConfiguration.java
@@ -7,7 +7,6 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
@@ -211,15 +210,7 @@ private void copyBundle(IPath srcBundle, IPath launchDir, String childDir, IProg
* @throws CoreException
*/
private String[] getVMArgs(File confFile, String felixPluginBase) throws MalformedURLException, CoreException {
- String [] cs = getVMArgs();
-
- List l = Arrays.asList(cs);
- List l2 = new ArrayList(l);
- String s = confFile.toURI().toURL().toString();
-
- l2.add("-Dfelix.config.properties=" + s);
-
- return (String[]) l2.toArray(new String[l.size()]);
+ return getVMArgs();
}
/**
@@ -228,8 +219,15 @@ private void copyBundle(IPath srcBundle, IPath launchDir, String childDir, IProg
*/
protected abstract String[] getVMArgs() throws CoreException;
- private File createFelixConfFile(ILaunchConfiguration configuration, IPath launchDir, String felixPluginBase, Map<String, String> props) throws IOException {
- File configFile = new File(launchDir.toOSString(), "config.properties");
+ private File createFelixConfFile(ILaunchConfiguration configuration, IPath launchDir, String felixPluginBase, Map<String, String> props) throws IOException {
+ File configDir = new File(launchDir.toOSString(), "default");
+
+ if (!configDir.exists())
+ if (!configDir.mkdirs())
+ throw new IOException("Unable to create " + configDir);
+
+
+ File configFile = new File(configDir, "simulator.properties");
FileWriter fw = new FileWriter(configFile);
props.putAll(getFelixLaunchProperties());

0 comments on commit 2fcccd8

Please sign in to comment.
Something went wrong with that request. Please try again.