Subj : Re: Calling Java from JavaScript To : Andrew From : Igor Bukanov Date : Tue Feb 15 2005 09:41 am Andrew wrote: > Can anyone explain how to call a Java class method from Rhino JavaScript? > The class is one I have written myself. > > Where does my class have to be ? > What is the syntax of the importClass or ImportPackage call > How do I call the method itself > > For instance, My class is Foo: > > package foobar; > public class Foo { > public static void hello() > { > System.out.println("Hello World") ; > } > } > > > and I want to call hello() from JavaScript. Just write: Packages.foobar.Foo.hello(); Regards, Igor .