Spaces in VM Parameters

I asked this before for version 3, but nobody ever responded.

When trying to debug a unittest that has spaces in the VM parameters, I get
'Could not find the Main Class. Program will exit' It works fine if I just run it.

I've tried the following combination of quotes for the parameter.
"-DconfigPath=/Documents and Settings"
-D"configPath=/Documents and Settings"
"-DconfigPath="/Documents and Settings"

7 comments
Comment actions Permalink

I've tried the following combination of quotes for the parameter.
"-DconfigPath=/Documents and Settings"
-D"configPath=/Documents and Settings"
"-DconfigPath="/Documents and Settings"


What about: -DconfigPath="/Documents and Settings"

Worked here on a simple test class:

-DconfigPath="a config path ..."

System.out.println("prop: " + System.getProperty("configPath"));

Result:

prop: a config path ...


0
Comment actions Permalink

Nope. -DconfigPath="a config path ..." works when I run it, but not when I debug it.

0
Comment actions Permalink

That reminds me of a problem I was having with 3.0.4. I didn't know what was going on so I solved it by running JUnit via ant and using remote debugging.

0
Comment actions Permalink

Nope. -DconfigPath="a config path ..." works when I run it, but not when

I debug it.

Simple test:

public class Test1 {

public static void main(final String[] args) {

System.out.println("prop: " + System.getProperty("configPath"));
}
}

Runs and Debugs ok here (idea #944) - I think there was a tracker entry for
this bug for earlier idea versions.


0
Comment actions Permalink

The simple test case works, but the one in my project still fails. I am using build 944. It also used to happen in 3.0.4. I'm attaching the message boxes and the run/debug dialog box that I used.



Attachment(s):
image002.jpg
image004.jpg
image006.jpg
0
Comment actions Permalink

Look like a BUG ...
Did you file SRC already? ;)

0

Please sign in to leave a comment.