On Sun, Sep 04, 2005 at 05:44:00PM -0400, Patrick LeBoutillier wrote:
> Tim,
> 
> > > Seems you have stumbled onto a special case that Inline::Java does not
> > > handle correctly.
> > 
> > This might be another one... how to I translate
> > 
> >         Class.forName(...).newInstance();
> > 
> > into Perl using Inline::Java?
> 
> That's pretty much what Inline::Java does for you in the background
> when you study a class and call myclass->new(). Can you provide a
> small example of what you are trying to achieve?

It's just the typical JDBC get-the-driver-class-loaded snippet:

   Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();

At this point I'm just exploring how literal the translation from Java to
Perl can be made - but Class.forName() is certainly a special case.
I'm using study_classes() for now, but I could add a little Java method
to do the Class.forName and call it from perl with the name of the class.
No problem.

Thanks.

Tim.

Reply via email to