de.htwsaar.config.JarTesting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mc-config-tool-jar-test Show documentation
Show all versions of mc-config-tool-jar-test Show documentation
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.
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