简体   繁体   English

我在jar文件中找不到我的库

[英]I can't find my libs in jar file

I am making a simple Desktop application in java, Build using gradle.I have added log4j jar into my application. 我正在用gradle在Java中构建一个简单的桌面应用程序。我已经将log4j jar添加到了我的应用程序中。 App runs in eclipse. 应用在Eclipse中运行。 But when I run it in my terminal using java -jar xxx.jar it not recognize the log4j. 但是,当我使用java -jar xxx.jar在终端中运行它时,它无法识别log4j。 Then I extract my jar file and check is there any log4j.jar files. 然后我解压缩我的jar文件,并检查是否有log4j.jar文件。 But I can not find it. 但是我找不到它。 I know There is a problem with my build.gradle file. 我知道我的build.gradle文件有问题。 I tried to find it through Internet, But still can not. 我试图通过Internet找到它,但是仍然找不到。 Any body can help me? 有谁可以帮助我? How should I write the code to copy libs into my jar file ? 我应该如何编写将libs复制到jar文件中的代码?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM