Reputation: 4234
I have created for my application, some custom GUI component and used them.
Now i want to make them redistributable. I know that add the sources to another project and use them in that way, but i'd prefer to make something like a jar or similar.
I want that if an user add my library (maybe a jar??) to its application, he can add the gui component in his application as any other components (using drag and drop or simply specifying it in the application layout).
Is it possible?
Upvotes: 1
Views: 326
Reputation: 3015
Definitely....this is the whole concept of Java libraries and code reuse. You must decide on an api for your components or in a way how you intend them to use your api, and publish them in the form of a jar. Then any user who wants to use your classes will be able to include the jar in his classpath and be able to reuse your components.
Upvotes: 1