title: Java8 JS Nashorn convert array to Java array
body: <p>How can I convert JS array to native array ?
  In Rhino conversion looked like (Scala code):</p>
  
  <pre><code>val eng = (new javax.script.ScriptEngineManager).getEngineByName("JavaScript")
  val obj = eng.eval("[1,2,3,4]")
  val arr = obj.asInstanceOf[sun.org.mozilla.javascript.internal.NativeArray]
  </code></pre>
  
  <p>In Nashorn NativeArray absent, and I can't find any documentation on conversion.</p>