Thx, it worked. I had to workaround other things in my program, because I had some java methods with variable number of arguments in the signature and I don't know how to call them in jyhton.It was always complaining that I was passing more arguments than the signature was asking for.

As the method also had another way to call, passing the variable args in a list, I put all of them inside [ ] and it worked.

Thank you.

On Dec 18, 2007 11:41 AM, Charlie Groves <> wrote:
On Dec 18, 2007 8:09 AM, Teresa Van Dusen <> wrote:
> What I need to know is if it is possible to obtain a java.lang.Class
> instance from the Jython class upon which we can invoke newInstance in the
> Java code that is being executed when I pass the class as a parameter.
>  I tried myobject.loadNewClass(MyNewClass.NAME, MyNewClass.__name__) and
> __name__ is returning just the class name (MyNewClass).
> As the loadNewClass method also accepts the class object itself instead of
> the fully qualified name of the class, I tried
>  myobject.loadNewClass(MyNewClass.NAME, MyNewClass.__class__)
> but it fails because the java code is trying to instantiate
> org.python.core.PyClass

Calling myobject.loadNewClass(MyNewClass.NAME, MyNewClass) should do the trick.