[英]External Jar is not visible from classes under a package
I have an external.jar
in my maven project running with IntelliJ. 我在使用IntelliJ运行的Maven项目中有一个external.jar
。 My class1
cannot resolve my external.jar
until I remove it out from package1
. 我的class1
无法解析我的external.jar
直到将其从package1
删除。 Could you please suggest me a best practice in order to solve such a problem by keeping the folder structure as below. 您能否建议我一个最佳实践,以通过保持以下文件夹结构来解决此类问题。
mvn -v : Apache Maven 3.6.0, Java version: 1.8.0_212
Folder Structure:
-src
--test
---java
----package1
-----class1
----package2
---resources
----external.jar
-target
-External Libraries
You keep all your external jars under lib folder. 您将所有外部jar保存在lib文件夹下。 Refer below link 参考以下链接
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies
Steps for adding external jars
in IntelliJ IDEA as follows. 在IntelliJ IDEA中添加外部jars
步骤如下。
Please refer this official document from IntelliJ. 请从IntelliJ参考此官方文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.