
how can I catch the exception of Class.forName?
I'm writing a database applet.
This applet uses RMIJDBC.
Because the IE doesn't support the RMIJDBC properly, I have to download and
install the patch from the microsoft ftp server.
after this, it works.
BUT:
Of course there may be user who wants to use the applet from a machine which
has no RMICJBC installation from the microsoft ftpo server.
so, if the user wants to use the applet, I have to warn him to install the
RMI patch first.
in the source code I load the driver with this line:
Class.forName("RmiJdbc.RJDriver").newInstance();
If the driver is properly installed on the client it works.
If the driver isn't properly installed on the client it gives me an error
message:
java.io.FileNotFoundException:
sawd21557nmp:80//test/rmi_test/java/rmi/NotBoundException.class
java.lang.NoClassDefFoundError: java/rmi/NotBoundException
my problem is, I CAN'T catch this error message:
try{
Class.forName("RmiJdbc.RJDriver").newInstance();
Quote:
}
catch (Exception e){
System.out.println("BIG ERROORRRRR");
Quote:
}
It doesn't work. if I try to use the applet without installed RMI patch, the
applet will stop after the forName but the catch block doesn't catch the
error.
What's wrong?