Reputation: 54113
What would be the equivalent of a library in C++ for Java? I have some classes I'd like to reuse as a library in multiple projects.
Thanks
Upvotes: 0
Views: 252
Reputation: 1500385
Basically you build a jar file with the classes in, and then add a reference to that jar file on the classpath for both compilation and execution.
See the Oracle Jar File Tutorial for more information.
Upvotes: 2