Package com.sun.crypto.provider does not exist error

Reason: The program was written with version 1.6 and opened with version 1.7 or above

Solution: Download 1.6 jdk, get sunjce_provider.jar (installed by default in C:\Program Files\Java\jdk1.6.0_45\jre\lib\ext), put it in the project, if it is a maven project, first in the pom file Add the following plugin, then put the jar package in webapp/WEB-INF/lib

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.6.0</version>
    <configuration>
        <source>1.8</source> 此为运行的jdk版本
        <target>1.8</target>
        <encoding>UTF-8</encoding>
        <compilerArguments>
            <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs>
        </compilerArguments>
    </configuration>
</plugin>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324684143&siteId=291194637