简体   繁体   中英

create two executable jar for the same project?

I have developed an Java application with RMI,JPA and H2DB, look at the screenshot is my project :

在此输入图像描述

All I need is to have two JARs (client and server) with imports to the libraries described in the screenshot. the problem is that netbeans does not generate two JARs for the same project :

在此输入图像描述

this box allows you to create a single jar for the project... is there a solution for this problem?

thans in advance.

Break up your project into three modules. One for shared code, one for server and one for client. Having it all together like you have will eventually result in unmaintainable code (and sooner rather than later..).

If you want to keep your project structure, I would suggest using an ant script to build your jars. That way you can specify which source files and jar dependencies to include in your client and server jars.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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