Is there a way to prevent the program from dying in such a case? For example, I
was trying to do the following:

--------------------------------------------------------------------------------

BEGIN {
        $ENV{'CLASSPATH'} = 'C:\Sonic\MQ6.1\lib\certj.jar';
}

eval{
        use Inline Java => 'STUDY', STUDY => ['com.rsa.certj.xml.Transformer'];
};

print "/n I came out of the eval block/n";

--------------------------------------------------------------------------------

But, it still died inside the eval block with the same message.

Thanks.

Vishal
  


>
> [C:\sonicMQ-Perl]test.pl
> java.lang.NoClassDefFoundError: com/rsa/jsafe/JSAFE_Exception
>         at com.rsa.certj.xml.Transformer.<clinit>(Transformer.java:91)

Seem like Inline::Java is trying to load
com.rsa.certj.xml.Transformer, but during the class initialisation
(static member?, static block?), com.rsa.certj.xml.Transformer is
trying to itself load com/rsa/jsafe/JSAFE_Exception, which can't be
found.

My guess is that you probably nedd to load othre extra jar files to
get that class.

> Also, Transformer
> is an abstract class. Does that matter?

IIRC, you can't instantiate an abstract class since it is
"incomplete". Normally you must extend it to fill in the unimplemented
parts. You might get some sort if InstantiationException when you try
to use it.

Patrick

>
> Thanks.
>
> Vishal
>
> ----------------------------------------
> This mail sent through www.mywaterloo.ca
>


--
=====================
Patrick LeBoutillier
Laval, Québec, Canada

----------------------------------------
This mail sent through www.mywaterloo.ca

Reply via email to