Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getSysProp(String inSysProperty, String defaultValue) {

        String outPropertyValue = null;

        try {
            outPropertyValue = System.getProperty(inSysProperty, defaultValue);
            if (inSysProperty.equals("password")) {
                System.out.println(inSysProperty + "=*****");
            } else {
                System.out.println(inSysProperty + "=" + outPropertyValue);
            }
        } catch (Exception e) {
            System.out.println("Error Reading Required System Property '" + inSysProperty + "'");
        }

        return (outPropertyValue);

    }
}