On Jan 19, 7:00 am, tlrobinson <[EMAIL PROTECTED]> wrote: > On Dec 19 2007, 8:34 am, [EMAIL PROTECTED] wrote: > > > Hi all! > > > I am working with Rhino and I am importing Java packages. It works ok, > > but I would like to use JTidy, a .jar file, and I don't know how to > > import it in Rhino. It can't find it. I have tried taking the .class > > files out of the .jar file and try to import them, but no results. > > > Can anybody help me? > > > Thanks in advance > > I too am wondering how to use external libraries with Rhino. I've > tried putting the .jar in my classpath and using the > java.com.domain.packagename syntax, but no such luck. > > Thank you.
If you have a class com.foo.Bar, then you load it by "Packages.com.foo.Bar". "java.com.foo.Bar" would only work if your class was really a subpackage of "java". 1.7 will include a top-level definition for "com", among others. Once 1.7 is released you'll be able to load com.foo.Bar using com.foo.Bar. --N _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
