Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!

a haksdjf

Greenhorn
+ Follow
since Nov 22, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by a haksdjf

Peter Heide wrote:One of the SCJA Exam Objectives is:

demonstrate the proper use of the "java" command including the command-line option -D

The java jdk documentation specifies:

-Dproperty=value
Set a system property value. If value is a string that contains spaces, you must enclose the string in double quotes:
java -Dfoo="some string" SomeClass

My question is: How can I access this property value in the code. Does someone have an example?



Can someone let me know how I and specify multiple key/value pairs?

Thanks,
9 years ago