Eclipse:在多个项目之间共享代码 [英] Eclipse: share code among multiple projects

查看:136
本文介绍了Eclipse:在多个项目之间共享代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有不同的项目(java me midlets),它们都需要共享代码。目前我复制的东西,但这不是理想的。
最好的方法是什么?
谢谢!



编辑:
我尝试在Build Path中添加另一个项目,但是当在模拟器中运行Midlet时,我得到以下错误:



未捕获的异常java / lang / NoClassDefFoundError:clientlibrary / ov9292 / Ov9292Client。

解决方案

您可以创建一个Java项目,该项目将包含共享代码并让其他项目引用它。部署时,您可以将该项目打包为单独的jar文件。


I have different projects in Eclipse (java me midlets) which all need to share code. Currently I duplicate things, but this is not ideal. What is the best way to do this? Thanks!

EDIT: I tried to add another project in the Build Path, but then, when running the Midlet in a Emulator, I get the following ERROR:

Uncaught exception java/lang/NoClassDefFoundError: clientlibrary/ov9292/Ov9292Client.

解决方案

You can create a Java Project which will contain the shared code and have other projects reference it. When deploying you can pack this project as a separate jar file.

这篇关于Eclipse:在多个项目之间共享代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆