Skip to content

Instantly share code, notes, and snippets.

@dawesi
Last active August 29, 2015 14:13
Show Gist options
  • Save dawesi/3087a31280a5dd5f0213 to your computer and use it in GitHub Desktop.
Save dawesi/3087a31280a5dd5f0213 to your computer and use it in GitHub Desktop.
// 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