Are there any open-source libraries that all programmers should know about? I'm thinking
something general, a sort of extension to the standard java.util
that contains basic functions that are useful for all kinds of application.
views:
732answers:
11The Google Collections API is pretty handy if you use lots of, well, Collections...
It might be worth saying that the first thing to do is get to know the libraries in the newer versions of Java. A lot of ideas have worked their way back into java - java.util.concurrent, java.nio, and javax.xml
The Spring framework is surprisingly general purpose. I started by just using it as a configuration management tool, but then realized how helpful dependency injection is when doing test-driven development. Then I slowly discovered many useful modules hidden in the corners of Spring.
JXL for Excel workbook creation/edition. I work in a bank and the multipurpose report tool for diary work is Excel. Whatever appliction we do must import/export from/to Excel. The only fail it's that it has memory problems with large workbooks and formating it's a little obscure
Functional Java offers first-class function values, immutable lists/arrays, lazy/infinite streams, tuple types, either types, optional values (type-safe alternative to null). Works well in conjunction with Google Collections or the java.util collections.
It also provides handy concurrency abstractions like parallel strategies, parallel list/array functors, actor concurrency, and composable light-weight processes.
Take a look at jmate project. It contains really helpful methods for strings, collections and IO operations (for now).
Look some examples here.
lambdaj is a thread safe library of static methods that provides an internal DSL to manipulate collections in a pseudo-functional and statically typed way without explicitly iterating on them. It eliminates the burden to write (often poorly readable) loops while iterating over collections.
Google Collections migrated to great Guava Libraries . It contains some common utilities, string matcher, splitter, joiner, IO utils etc.