Sourav Chandra
Sourav Chandra

Reputation: 31

Could not initialize class sun.security.mscapi.SunMSCAPI

We have client-server application and we launch the client application using java web start.

While trying to open client application, it first reads a token file from https url (for SSO) and later opens another HTTPS url.

tokenUrl = new URL(protocol, nodeIpAddress, port, tokenFile); URLConnection con = tokenUrl.openConnection();

The openConnection() is throwing below Exception:

java.lang.NoClassDefFoundError: Could not initialize class sun.security.mscapi.SunMSCAPI

Could any one please help what is the exact issue here and please provide necessary workarounds.

Thanks, Sourav

Upvotes: 3

Views: 5546

Answers (1)

Michael Borgwardt
Michael Borgwardt

Reputation: 346327

That class is an implemention of the Microsoft Crypto API, and it was added to the JRE only in Java 6 - so I suspect that it's a JRE version issue.

Upvotes: 1

Related Questions