code: public boolean checkEnvironment(PrintWriter pw)
    {
  
      // Use user-specified output writer if non-null
      if (null != pw)
        outWriter = pw;
  
      // Setup a hash to store various environment information in
      Hashtable hash = getEnvironmentHash();
  
      // Check for ERROR keys in the hashtable, and print report
      boolean environmentHasErrors = writeEnvironmentReport(hash);
  
      if (environmentHasErrors)
      {
        // Note: many logMsg calls have # at the start to 
        //  fake a property-file like output
        logMsg("# WARNING: Potential problems found in your environment!");
        logMsg("#    Check any 'ERROR' items above against the Xalan FAQs");
        logMsg("#    to correct potential problems with your classes/jars");
        logMsg("#    http://xml.apache.org/xalan-j/faq.html");
        if (null != outWriter)
          outWriter.flush();
        return false;
      }
      else
      {
        logMsg("# YAHOO! Your environment seems to be OK.");
        if (null != outWriter)
          outWriter.flush();
        return true;
      }
    }
docs: Programmatic entrypoint: Report on basic Java environment
  and CLASSPATH settings that affect Xalan.
  
  <p>Note that this class is not advanced enough to tell you
  everything about the environment that affects Xalan, and
  sometimes reports errors that will not actually affect
  Xalan's behavior.  Currently, it very simplistically
  checks the JVM's environment for some basic properties and
  logs them out; it will report a problem if it finds a setting
  or .jar file that is <i>likely</i> to cause problems.</p>
  
  <p>Advanced users can peruse the code herein to help them
  investigate potential environment problems found; other users
  may simply send the output from this tool along with any bugs
  they submit to help us in the debugging process.</p>
  
  @param pw PrintWriter to send output to; can be sent to a
  file that will look similar to a Properties file; defaults
  to System.out if null
  @return true if your environment appears to have no major
  problems; false if potential environment problems found
  @see #getEnvironmentHash()