Is this possible for use javascript to call a java method?
<p>The java have a script manager that allow java calling javascript, like this:</p>

<pre><code>import javax.script.*;
public class ExecuteScript {
 public static void main(String[] args) throws Exception {
 // create a script engine manager
 ScriptEngineManager factory = new ScriptEngineManager();
 // create a JavaScript engine
 ScriptEngine engine = factory.getEngineByName("JavaScript");
 // evaluate JavaScript code from String
 engine.eval("print('Welocme to java world')");
 }

 public static void sayHi(){
   System.out.println("hihi");
 }
}
</code></pre>

<p>My question is, if I have a sayHi() function, can I use the javascript, via the script engine to call the Java function? Thanks. </p>
