Reputation: 1153
I am running the command
java -jar -Darg1="1" -Darg2="2" -Darg3="3" -Darg4="4" -Darg5="5" -Darg6="6" app.jar
I want to pass a file which has all the properties instead of passing them using -D.
Is there any option in Java which can load these arguments from a file.
Upvotes: 1
Views: 255
Reputation: 5482
The java command does not support passing a property file for VM arguments. Instead you can load a property file through your java code and then call : "System.SetProperties(loadedProps)" in the early initialization of your code.
Upvotes: 1