Marwen Trabelsi
Marwen Trabelsi

Reputation: 4257

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 :

enter image description here

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 :

enter image description here

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

thans in advance.

Upvotes: 0

Views: 178

Answers (2)

ChrAfonso
ChrAfonso

Reputation: 170

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.

Upvotes: 1

Manfred Moser
Manfred Moser

Reputation: 29912

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..).

Upvotes: 1

Related Questions