Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access restriction: The constructor Provider() is not accessible due to restriction on required library jdk1.6.0\jre\lib\jsse.jar?

Tags:

java

i am using javax.Mail api with authenticator, but this below code giving

Access restriction: The constructor Provider() is not accessible due to restriction on required library C:\Program Files (x86)\Java\jdk1.6.0\jre\lib\jsse.jar

java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

how to resolve this.

like image 260
Ramesh Kotha Avatar asked Jan 29 '12 10:01

Ramesh Kotha


2 Answers

i just removed JRE system library from my project build path and re added. just the error message disappears, how it happened i don't know but my error got resolved.

like image 80
Ramesh Kotha Avatar answered Nov 03 '22 02:11

Ramesh Kotha


In my case, it occurred before I update Maven Project. In eclipse I do this:

Project → Properties → Java Build Path → Edit JRE System Library:

Select Workspace default JRE

I noticed that every time when I Update Maven, the problem occurs again. And I have to do everything again.

What have I to do for not need repeat the steps again, after Update Maven Project?

like image 42
Gabriel Moreira Avatar answered Nov 03 '22 01:11

Gabriel Moreira