Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.FileInputStream;

import java.util.Properties;

public class Main {
    private static String CONFIG_FILE_PATH = "/mnt/sdcard/config.properties";

    /**
     * Read config file.
     */
    private static Properties loadConfig() {
        Properties properties = new Properties();
        try {
            FileInputStream s = new FileInputStream(CONFIG_FILE_PATH);
            properties.load(s);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return properties;
    }
}