项目中遇到的问题:IDEA maven项目报错:程序包com.sun.image.codec.jpeg不存在

错误截图:

解决方法:在pom.xml文件中间加上以下代码:

代码:

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArguments>
                        <verbose />
                        <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                    </compilerArguments>
                </configuration>
            </plugin>

猜你喜欢

转载自www.cnblogs.com/yunfang/p/10911942.html