There are two different ways you can add/override spring properties on the command line.
It's important that the -D parameters are before your application.jar otherwise they are not recognized.
java -jar -Dspring.profiles.active=prod application.jar
java -jar application.jar --spring.profiles.active=prod --spring.config.location=c:\config