Last active
August 29, 2015 14:18
-
-
Save atadams/1f8d09f372ea00d64a62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Location to your properties file | |
var pFile = 'location_to_your_properties_file/filename.properties'; | |
// Init Props | |
var props = CreateObject("java","java.util.Properties").init(); | |
// Load the file into the props | |
props.load( CreateObject("java","java.io.FileInputStream").init(pFile) ); | |
// Assume properties file has the following value | |
// Property1=Foo | |
// Property2=Bar | |
// Property3=Foobar | |
// You can now access them via: | |
writeoutput( props.getProperty('Property1') ); | |
// Thus, if you knew an array of properties | |
var expectedProperties = ['Property1','Property2','Property3']; | |
// Let's output | |
for(var e in expectedProperties) writeoutput(prop.getProperty(e)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment