What is the best way to parse this command line arguments in java?
$ ant run -Dfilename=(filename_value) -Dmemory_size=(memory_size) -Dk=(k_value)
I am not actually using ant but my project will be evaluated on this command line. Therefore, I am trying to test this on netbeans by adding this example arguments in run configurations.
-Dfilename="C:\\Users\\y_guz_000\\Dropbox\\active projects\\ExternalSort2\\resources\\input.xml" -Dmemory_size="3"
-Dk="2"
I am outputting the result with:
System.out.println(System.getProperty("filename"));
System.out.println(System.getProperty("memory_size"));
System.out.println(System.getProperty("k"));
However the result is
null
null
null