1 Reply Latest reply on Apr 17, 2006 9:46 AM by Newsgroup_User

    Accessing java.lang.System

    paul_harv
      Can someone please tell me how I can set a java system property from ColdFusion Code?
      I want to do the equivalent of

      java.lang.System.setProperty("name", "value");
      (this is in order to set the javax.xml.parsers.SAXParserFactory property so I can use the Saxon XSLT processor)

      How can I get at the underlying java.lang.System to do this?

      Thanks!
        • 1. Re: Accessing java.lang.System
          Level 7
          paul_harv wrote:
          > Can someone please tell me how I can set a java system property from ColdFusion
          > Code?
          > I want to do the equivalent of
          >
          > java.lang.System.setProperty("name", "value");
          > (this is in order to set the javax.xml.parsers.SAXParserFactory property so I
          > can use the Saxon XSLT processor)

          <cfscript>
          propertyKey="yourKey";
          propertyValue=5;
          //or use java.util.Properties
          prop=createObject("java","java.lang.System");
          prop.setProperty(propertyKey,propertyValue);
          </cfscript>