版权声明:本文为作者原创,转载请注明出处 https://blog.csdn.net/dataiyangu/article/details/82854004
idea将外部的jar包打入到里面的时候,只需要在module中配置即可。所以我的jar包究竟到了哪里,我没有深入去研究这个东西,我只知道jar包在maven打包的时候,并没有一起打进去,导致找不到符号之类的错误。
解决:
1.在任意目录下面创建lib(其他的名字也可以)文件夹。注意:文件夹设置成原始格式,不要设置成resource之类的。
2.在pom.xml中
<plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/lib</extdirs> </compilerArguments> </configuration> </plugin>
3.如果要放到linux系统中,为了避免没有包,直接将这些jar包scp到$JAVA_HOME/jre/lib/ext