开发者

How to Build NetBeans Project into split JARs? (one with the mainclass, others as libraries)

开发者 https://www.devze.com 2023-01-14 18:18 出处:网络
I have a project which builds into a single JAR in Netbeans. However, to implement a basic auto update feature, I would like to move at least one of the packages (the HTTPClient package) to a separat

I have a project which builds into a single JAR in Netbeans.

However, to implement a basic auto update feature, I would like to move at least one of the packages (the HTTPClient package) to a separate JAR, as well as build a new JAR with a second Ma开发者_开发知识库in Class in a different package.

That way both the current Mainclass and the Updater Mainclass can use the same HTTPClient package.

But... HOW?

Something to do with the build-impl.xml file. But where? What to change?


You could create a separate project for your HTTPClient package which creates a single jar file.

Your main project then uses this project (and the created jar). You can use "Add project..." at the libraries of your main project and select the HTTPClient project.

0

精彩评论

暂无评论...
验证码 换一张
取 消