code: String expand(String s)
      {
          int i1=0;
          int i2=0;
          while(s!=null)
          {
              i1=s.indexOf("$(",i2);
              if(i1<0)
                  break;
              i2=s.indexOf(")",i1+2);
              if(i2<0)
                  break;
              String property=System.getProperty(s.substring(i1+2,i2),"");
              s=s.substring(0,i1)+property+s.substring(i2+1);
          }
          return s;
      }
docs: /* ------------------------------------------------------------