java - How to pass system properties to a jar file -


i have main class expects properties pass using -d option. can access in ide sending them vm options.

i package application jar file using maven , when try following:

java -jar myjar.jar -denviroment=dev

or

java -jar myjar.jar "-denvironment=dev"

the enviroment system property not getting picked up.

any pointers on going on?

pass arguments before -jar. if pass them after jar file interpreted command line parameters , passed string[] args in main. like,

java -denviroment=dev -jar myjar.jar  

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -