[英]JAR does not recognize referenced libraries
When I launch jar file from terminal it gives java.lang.NoClassDefFoundError as obviously it cannot recognize referenced libraries that I have included in the project. 当我从终端启动jar文件时,它给出了java.lang.NoClassDefFoundError,因为它显然无法识别我已经包含在项目中的引用库。
Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: org/icepdf/core/exceptions/PDFException
However I have added them to build path. 但是我添加了它们以构建路径。
I am using the following command to launch my application: 我正在使用以下命令启动我的应用程序:
java -jar app.jar
What can be wrong? 有什么事吗
If you have your core project in the workspace: 如果您的核心项目在工作区中:
Eclipse
右键单击将在Eclipse
使用核心项目的项目 properties
前往properties
Deployment Assembly
" on the left 然后左侧的“ Deployment Assembly
” Add
on the right 使用右侧的Add
按钮 project
and search your core project and use the " Finish
" button 选择project
并搜索您的核心项目,然后使用“ Finish
”按钮
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.