Subj : Re: using packages in embedded Rhino ... To : netscape.public.mozilla.jseng From : Lapo Date : Fri Sep 17 2004 01:32 pm ouch sorry! I should have looked at the doc a little bit better, sorry! :-) There's a top level object called Packages, that solves my problem! Lapo wrote: > Hello, > I am pretty new to Rhino. > How do I "import" packages in an embedded Rhino? > > I've already setup all the necessary code to execute js scripts and if > for example I wanto to use an HashMap in the script I can write > something like: > > var hash = new java.util.HashMap() > > That's great. > > Now, how do I create instances of other classes located in some other > package? > > For example: > > var myObj = com.mypackage.util.myObject() > > This won't work. Any advices? > > Thanks in advance :-) .