All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.htwsaar.config.JarTesting Maven / Gradle / Ivy

Go to download

This module simulates a Java Application which is packaged and distributed as a fat JAR. A Configuration File is placed in Jar, sothat is can be read as Resource.

There is a newer version: 4.2.1
Show newest version
package de.htwsaar.config;

import java.util.Set;

/**
 *
 * @author hbui
 */
public class JarTesting {

    public static void main(String[] args) throws Exception {        
        //JarTesting t = new JarTesting();
        EnvConfiguration conf = new ClasspathBasedConfig("no-existing-config.properties", "jar-testing-config.properties");
        Set config = conf.getAllConfigKeys();
        config.forEach(key -> {
            System.out.println("    " + key + " -> " + conf.getConfigValue(key));
        });        
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy