Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

configuration reader java

public class ConfigurationReader {
private static Properties properties;
static {
 try (FileInputStream fileInputStream = new FileInputStream("configuration.properties")) {
            properties = new Properties();
            properties.load(fileInputStream);
 } catch (IOException e) {
            e.printStackTrace();
throw new RuntimeException("Unable to find configuration.properties file!");
        }
    }
public static String getProperty(String key) {
return properties.getProperty(key);
Comment

PREVIOUS NEXT
Code Example
Java :: pattern exercises for java 
Java :: output of java file in terminal 
Java :: setlist arraylist java swing example 
Java :: java platform runlater keeps running 
Java :: Java Labeled continue Statement Java 
Java :: Java Creating LinkedHashSet from Other Collections 
Java :: Method returns value 
Java :: how to set up basic java workspace 
Java :: validate text field netbeans emails 
Java :: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type project and qualifiers [@Default] 
Java :: java stream anymatch vs findany 
Java :: java how to slit a dtring and trim at the same time 
Java :: how to read json object from text file in java 
Java :: javadoc generate docs for files in folder and subfolders 
Java :: isblank vs isempty java string utils 
Java :: Cloudinary image Transformation in Java 
Java :: with uses in python 
Java :: Spring security avec spring version 2.5.6 
Java :: previous method in jdbc 
Java :: 710*12 
Java :: How to efficiently solve the knpasack problem, in Java? 
Java :: how to check that letter is not a number and is repeating or not in a sentence in java 
Java :: has places api got deprecated??? 
Java :: Write a java program to print the ip address 
Java :: retrofit gradle 
Java :: stackoverflow java enum with constructor 
Java :: priority queue is empty java 
Java :: java ultimo dia del mes 
Java :: Java Classs Decomiler free 
Java :: webview send to console android 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =