{
String[] props = VersionHelper.PROPS; // system/applet properties
if (env == null) {
env = new Hashtable(11);
}
Applet applet = (Applet)env.get(Context.APPLET);
// Merge property values from env param, applet params, and system
// properties. The first value wins: there's no concatenation of
// colon-separated lists.
// Read system properties by first trying System.getProperties(),
// and then trying System.getProperty() if that fails. The former
// is more efficient due to fewer permission checks.
//
String[] jndiSysProps = helper.getJndiProperties();
for (int i = 0; i < props.length; i++) {
Object val = env.get(props[i]);
if (val == null) {
if (applet != null) {
val = applet.getParameter(props[i]);
}
if (val == null) {
// Read system property.
val = (jndiSysProps != null)
? jndiSysProps[i]