On Oct 20, 2:13 pm, Jon  Zeppieri <[EMAIL PROTECTED]> wrote:
> I have a class "one.two.Foo" in a jar file named "foo.jar".  From the
> documentation, I think I should be able to do the following:
>
> var url = new java.net.URL("file:///path/to/foo.jar");
> var loader = new java.net.URLClassLoader([ url ]);
> var pks = new Packages(loader);
> var foo = pks.one.two.Foo();
>
> However, this doesn't work.  I'm getting a NullPointerException:
>
> [snip]
>
> This is taking place in a very simple embedding of Rhino in a servlet.
>

By the way, the exact same error occurs in the shell, so the embedding
is irrelevant.  The 'pks' instance of NativeJavaPackage apparently
doesn't have a parent scope.  I'd expect it to be the global scope,
right?  But, for some reason, it's null.

-Jon
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to