I am running a java spring boot application in STS, and using java 17.and the build tool i am using gradle.
i am facing the compilation error called sun.security.util.DerEncoder is not accessible.
i found something that from java 16 this package is not available but while i am searching the same class called DerEncoder and some other classes,example:
import sun.security.util.DerEncoder;
import sun.security.util.DerOutputStream;
import sun.security.util.DerValue;
import sun.security.util.ObjectIdentifier;
import sun.security.x509.X500Name;
it is availble in the class path in the java.base jar file and package also same.
so i am in bit of confusion mode that if the package is not available from hava 16,
then why it is included in the java.base package.
and i also tryed few suggestions like trying add
*–add-exports=java.base/sun.security.provider=ALL-UNNAMED
–add-opens=java.base/sun.security.util=ALL-UNNAMED *
but still no luck. can anybody please suggest the better solution.