The largest Interview Solution Library on the web


java tutorials/
« Previous | 1 | 2 | 3 | Next »

The GetProperty Example


import java.security.*;
class GetProperty {
public static void main(String[] args) {
try {
if (args.length > 0) {
String s = System.getProperty(args[0],"name "
+ args[0] + " not specified");
System.out.println(args[0] + " property
value is: " + s);
} else {
System.out.println("Property name
required");
}
}
catch(Exception e){
System.err.println("Caught exception " +
e.toString());
}
}
}
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com