Fixed start.jar property as properties issue

This commit is contained in:
Greg Wilkins 2014-08-21 10:45:28 +10:00
parent bd8bcd62e9
commit c1b66a3ea3
3 changed files with 11 additions and 8 deletions

View File

@ -176,18 +176,21 @@ public class CommandLineBuilder
@Override
public String toString()
{
return toString(" ");
}
public String toString(String delim)
{
StringBuilder buf = new StringBuilder();
boolean delim = false;
for (String arg : args)
{
if (delim)
if (buf.length()>0)
{
buf.append(' ');
buf.append(delim);
}
buf.append(quote(arg));
delim = true;
}
return buf.toString();

View File

@ -654,7 +654,7 @@ public class Main
if (args.isDryRun())
{
CommandLineBuilder cmd = args.getMainArgs(baseHome,true);
System.out.println(cmd.toString());
System.out.println(cmd.toString(File.separatorChar=='/'?" \\\n":" "));
}
if (args.isStopCommand())

View File

@ -1212,13 +1212,13 @@ public class XmlConfiguration
// For all arguments, load properties
for (String arg : args)
{
if (arg.toLowerCase(Locale.ENGLISH).endsWith(".properties"))
properties.load(Resource.newResource(arg).getInputStream());
else if (arg.indexOf('=')>=0)
if (arg.indexOf('=')>=0)
{
int i=arg.indexOf('=');
properties.put(arg.substring(0,i),arg.substring(i+1));
}
else if (arg.toLowerCase(Locale.ENGLISH).endsWith(".properties"))
properties.load(Resource.newResource(arg).getInputStream());
}
// For all arguments, parse XMLs