I'd like to be able to set a property on the JVM using the -D
switch. If I do that, can I access it from my code? If yes, how?
Use System.getProperty("mykey");
Apart from System.getProperty
, there's also Integer.getInteger
and Boolean.getBoolean
, if you want to get an integral or boolean value instead. :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With