Is it just me or is there a problem with IDEA reading properties during run/debug? I swear I've done this 100 times and while it works fine from the command line it doesn't appear to work in the IDE. I've tried my 10 CE and my new Ultimate 13 installs with the same results.
public class PropertyTester {
public static void main(String[] args) {
String property = System.getProperty("property1");
System.out.println("property = " + property);
String property2 = System.getProperty("property2");
System.out.println("property2 = " + property2);
String property3 = System.getProperty("property3");
System.out.println("property3 = " + property3);
}
}
Program parameters: -Dmy-property1=abc -Dmy-property2= -Dmy-property3=ghi
What IDEA prints:
property1 = null
property2 = null
property3 = null
What command line prints when executing the jar:
property1 = abc
property2 =
property3 = ghi
What in the world am I missing? Maybe I've been staring at it too long.