Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ResourceBundle;

public class Main {
    private static final String CONF_PATH = "conf.system";
    private static ResourceBundle resourceBundle;

    public static String getConfigValue(String key) {
        return getResourceBundle().getString(key);
    }

    public static ResourceBundle getResourceBundle() {
        if (resourceBundle == null) {
            resourceBundle = ResourceBundle.getBundle(CONF_PATH);
        }
        return resourceBundle;
    }
}