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.
In my case I was upgrading a project to use Maven and run under Payara 5. Removing then re adding the JRE from the project build path made the error go away, but each time I changed the build path (removing one library at a time in favor of Maven POM entry) the error came back.
This worked for me: Properties -> Project Facets -> Runtimes tab Changed to Payara 5 Runtime.
In my case, it occurred before I update Maven Project. In eclipse I do this:
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?
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.