Warning Newbie here.
I am trying to read a properties file and set the values to be used throughout the code.
I can open the file and get the values. I am struggling on making the accessible for other classes/methods.
Here is what I have so far:
Properties configProp = new Properties();
InputStream cfgFile = new FileInputStream(appconfig);
configProp.load(cfgFile);
cfgFile.close();
String URL = configProp.getProperty("runtime.url");
String USER = configProp.getProperty("runtime.userid");
String PASS = configProp.getProperty("runtime.passwd");
I want to use these values in other methods and classes.
Thank you for any help!