Using application.getUserProperty and application.setUserProperty don't work with Runtimes, but sometimes you need that type of functionality, so here is how you implement it.  These functions will create and store the properties in a new runtimes.properties file. These functions also uses a Global variable named globals.g_util_runtimeProperties that should be of type MEDIA.
#1. A global method to run on open of your solution to read in the properties
var type = application.getApplicationType(); if(type == 6) //runtime { var runtimeProps = new Packages.java.util.Properties(); try { var fis = new Packages.java.io.FileInputStream("runtime.properties"); runtimeProps.load(fis) fis.close() } catch(err) { //first time startup } finally { globals.g_util_runtimeProperties = runtimeProps } }
var type = application.getApplicationType(); if(type == 6) //runtime { var out = new Packages.java.io.FileOutputStream("runtime.properties") globals.g_util_runtimeProperties.store(out, "--no comment--") out.close() }
var key = arguments[0] var type = application.getApplicationType(); if(type == 6) //runtime { return globals.g_util_runtimeProperties.getProperty(key) } else { return application.getUserProperty(key) }
var key = arguments[0] var value = arguments[1] var type = application.getApplicationType(); if(type == 6) //runtime { globals.g_util_runtimeProperties.setProperty(key, value) } else { application.setUserProperty(key, value) }