简体   繁体   English

将Eclipse项目编译到jar中

[英]compiling an Eclipse project into a jar

I reference another eclipse project from the current project I am working on. 我引用了我正在处理的当前项目中的另一个Eclipse项目。

Everything is working fine except when I try to jar up the referenced project and use the jar instead of the eclipse project my project doesn't run properly. 一切工作正常,但当我尝试打包引用的项目并使用jar而不是eclipse项目时,我的项目无法正常运行。

I know this is a bit vague but is there something I might be doing wrong in jaring up the referenced eclipse project that eclipse takes care of when I just add the project as a reference? 我知道这有点含糊,但是在添加引用的eclipse项目时我可能做错了什么,当我将项目添加为引用时,eclipse会照顾它?

I found out what the issue was. 我发现了问题所在。

The Project I was referencing has a set of reference libraries, which when I referenced the project were added as references to my project, however when I compiled the project to a jar, those projects were no longer referenced by my project so it didn't work 我正在引用的项目具有一组引用库,当我引用该项目时,这些引用库被添加为对我的项目的引用,但是当我将该项目编译到jar中时,这些项目不再被我的项目引用,因此没有工作

The solution was to add the referenced projects to the references of my project. 解决方案是将引用的项目添加到我的项目的引用中。

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

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