idea手动导入了包但编译运行还是报找不到xxx.jar包的解决方案
作者:seeutet
这篇文章主要介绍了idea手动导入了包但编译运行还是报找不到xxx.jar包的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教
idea手动导入了包但编译运行还是报找不到xxx.jar包
先把jar包放目录下并add as libary

在pom.xml中加入
<!--添加的本地的外部jar包依赖-->
<dependency>
<!--groupId、artifactId、version为自定义,groupId与artifactId但是不能重名-->
<groupId>JNative</groupId>
<artifactId>JNative</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/JNative.jar</systemPath>
</dependency>pom.xml中加入
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>build clean run 即可~~~~
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
