title: How to use javascript to new java inner class in Rhino engine?
body: <p>Here I write some js code in <strong>kettle</strong> Modified Java Script Value step (which use <strong>Rhino engine</strong>), to use java API. Actually, all the code works well. For example:</p>
  
  <pre><code>var fileInputStream = new java.io.FileInputStream(filePath); //new file object
  </code></pre>
  
  <p>But if I want to use the inner class, how could I new inner class in <strong>js</strong> environment? Here is the demo:</p>
  
  <pre><code>//java
  public class Out{
     public static class In {
         public String test = "Hello";
     }
  }
  //use inner class
  Out.In in = new Out.In();
  System.out.print(in.test); // successful!!
  
  
  //js
  var out = new Out();    // successful
  var in = new Out.In();  // error here.
  </code></pre>
  
  <p>error message</p>
  
  <pre><code>org.mozilla.javascript.Undefined@55516dbb is not a function, it is undefined
  </code></pre>
  
  <p>We can find that, javascript compiler <strong>view In() as a function of class Out</strong>, but  actually In() is the inner class of Out.</p>
  
  <p>From the Internet, I find that Nashorn, a newer javascript engine, supports scripts access java inner access, which grammar is that</p>
  
  <pre><code>var Float = Java.type("java.awt.geom.Arc2D$Float"); // using $ to indicate inner class
  </code></pre>
  
  <p>My question is that, how can I new a inner class from Rhino??? There must be several methods somewhere. </p>
  
  <p>Any help is greatly needed!!</p>