001package jmri.util;
002
003/**
004 * Print a Java system variable from the command line.
005 * <p>
006 * Intended to be invoked like:<br>
007 * <pre><code>
008 * java jmri.util.GetJavaProperty java.home
009 * </code></pre><br>
010 * to print the value of a Java system property in the current JVM, for example,
011 * within a script.
012 *
013 * @author Bob Jacobsen, Copyright (C) 2008
014 */
015public class GetJavaProperty {
016
017    // Main entry point
018    static public void main(String[] args) {
019        if (args.length < 1 || args[0].equals("-h")) {
020            System.out.println("Provide the name of a system property as an argument");
021            return;
022        }
023        System.out.println(System.getProperty(args[0]));
024    }
025}