Skip to content

Instantly share code, notes, and snippets.

@xperimental
Created January 14, 2011 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xperimental/779510 to your computer and use it in GitHub Desktop.
Save xperimental/779510 to your computer and use it in GitHub Desktop.
Simple program to view system property
/**
* Simple program to get the value of a single system property.
*
* @author xperimental
*/
class GetSystemProperty {
public static void main(String[] args) {
if (args.length != 1) {
System.out.println("usage: java GetSystemProperty property-name");
return;
}
String key = args[0];
String value = System.getProperty(key);
System.out.println(String.format("%s = %s", key, value));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment