How to check for an internal class in another module from java.base?
Alan Bateman
Alan.Bateman at oracle.com
Tue Nov 1 15:10:45 UTC 2016
On 01/11/2016 15:02, Wang Weijun wrote:
> HTTP Negotiate uses
>
> Class.forName("sun.net.www.protocol.http.spnego.NegotiatorImpl", true, null);
>
> to check if the implementation in java.security.jgss module is provided. It looks like this call is throwing a ClassNotFoundException now. Shall I export the package to java.base or is there any other trick? I remember there used to be an addReads method but seems no one is using it now.
>
> Or I must use a service loader?
>
This is just visibility. The jdk.security.jgss module is defined to the
platform class loader but but you have specified "null" (= bootstrap
class loader) to Class.forName.
There is an issue in JIRA to track change the HTTP protocol handler to
use services for authentication mechanism, I don't think anyone has had
time to work on that yet.
-Alan.
More information about the jigsaw-dev
mailing list