hammant     01/11/08 08:03:07

  Modified:    apps/db/src/java/org/apache/avalon/db/utils RhinoHelper.java
  Log:
  Rhino helper has test main method
  
  Revision  Changes    Path
  1.2       +8 -1      
jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/utils/RhinoHelper.java
  
  Index: RhinoHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/utils/RhinoHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RhinoHelper.java  2001/11/08 15:16:37     1.1
  +++ RhinoHelper.java  2001/11/08 16:03:07     1.2
  @@ -31,7 +31,7 @@
   
       public void executeAction(String script) throws ActionException {
           try {
  -            mBsfManager.exec("JavaScript", "<ANT>", 0, 0, script);
  +            mBsfManager.exec("javascript", "<ANT>", 0, 0, script);
           } catch (BSFException bsfe) {
               bsfe.printStackTrace();
               bsfe.getTargetException().printStackTrace();
  @@ -39,4 +39,11 @@
           }
       }
   
  +    public static void main(String[] args) throws Exception {
  +        RhinoHelper rh = new RhinoHelper();
  +        String bean = new String("Millis are " + System.currentTimeMillis());
  +        rh.addBean("msg",bean);
  +        rh.addBean("out",System.out);
  +        rh.executeAction("out.println(msg);");
  +    }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to