Message-Id: <s5458514.052@novell.com>
Date: Tue, 28 Apr 1998 07:27:41 -0600
From: "Vishal Goenka" <vgoenka@novell.com>
To: java-security@web2.javasoft.com, jdk-comments@web2.javasoft.com
Subject: Loading Security Provider Classes via ClassLoader
The getInstance(algorithm, provider) method of various security algorithms =
(MessageDigest et.al.) invoke the Security.getImpl(...) method, which in =
turn instantiates the required class (after mapping the actual implementati=
on class name via the security provider) using Class.forName(className), =
where className is the implementation class that we require to load.
If the implementation class ("className") is not available in the class =
path, but is accessible only through my own classloader (say), the =
Class.forName method returns error (obviously).
My question is :=20
How to get the security implementation classes loaded via my classloader, =
through the standard interface (MessageDigest.getInstance(...) for =
example).=20
I understand that since the java.security.Security and java.lang.Class =
classes are loaded by the default classloader, the forName method will =
query the default classloader only for loading the security implementation =
class. Does this mean, I *must* make the implementation classes available =
in the classpath to be read by the default class loader ??
Many thanks in advance.
Regards,
Vishal