The answer is NO. You may have seen an example where someone would install something like:
-DArguments=a=1,b=2,c=3,d=4,e=cow
The application will then analyze the value of the Arguments property string to obtain individual values. In main you can get the key values ββas (Assuming input format is guaranteed):
String line = System.getProperty("Arguments"); if(line != null) { String str[] = line.split(","); for(int i=1;i<str.length;i++){ String arr[] = str[i].split("="); System.out.println("Key = " + arr[0]); System.out.println("Value = " + arr[1]); } }
In addition, -D must be in front of the main class or jar file on the java command line. Example: java -DArguments=a=1,b=2,c=3,d=4,e=cow MainClass
ring bearer Sep 16 2018-11-11T00: 00Z
source share