I have the following code in my static class initialization code for loading
native code:

static
{
    try
    {
        System.load("some_path_A");
    }
    catch (Exception e)
    {
        System.load("some_path_B");
    }

    ..............


The class is used in a JSP project. If I put my native code in some_path_B,
then when the JSP page is accessed the first time, TomCat throws:

org.apache.jasper.JasperException: Can't load library: some_path_A

It is as if the exception is not catched at all. Also, according to Java
doc, the exception throw should be UnsatisfiedLinkException, not
org.apache.jasper.JasperException.

The above code runs normally in iPlanet with JDK1.3.1_08. It just fails in
Tomcat 4.1.24 with the same JDK. So I think it is related to Tomcat and not
JDK.

Could someone please help me to get around?

Regards
Peter Kwan



Reply via email to