The Best Java Tools You Never Knew Existed
I was at an awesome presentation at JavaOne of the long tail of Java tools that not many people have come across, which I had to share. So, in no particular order, and with my own emotive comments:
- Apache Abdera - work easily with Atom feeds. See also Rome.
- Antlr - this parser generator can look daunting, but it's pretty easy once you get your head around it. Can be used to parse things like complex URLs where regexps are not up to the job.
- ApacheDS - Java LDAP and Kerberos server, very easy to embed and great for testing your directory code. Now under the Apache Directory project which has heaps of other good stuff.
- ASM - small, efficient bytecode manipulation
- CGLIB - built on ASM, it works at a higher level and makes the former look like Assembler by comparison. Only downside is that it's not well documented
- JEXL - easily embeddable expression language, compares with OGNL
- DisplayTag - JSP taglib for table formatting and exporting
- EHCache - easy in-memory caching for everyone. Used this, it's awesome.
- Janino - someone took the time to write an embeddable Java compiler! It lets you use Java like a scripting language, eg. allow your users to type Java expressions directly into your GUIs.
- Jar Jar Links - allows you to overcome namespace/package clashes between different versions of libraries used by your product by repackaging them. Similar to the Minijar Maven plugin that approaches the problem slightly differently by removing unused classes. Can be used to resolve dependency issues (classpath hell).
- jDBI - substitute for JDBC that doesn't suck when used directly
- Jetty - web server/servlet container. Lightweight, yet lightning fast. Great for embedding, drives Grails.
- Joda Time - date time library that kicks butt over java.util.Calendar. Intuitive (January is month 1!), easy to use and complete - everything that the java.util classes aren't. Can be used alongside Date and Calendar. Chances are that the JSR based on this will become a part of Java 7, but why wait when you can use it now!
- JSON-lib - best Java JSON library out there. Has good documentation. See also Jaxen.
- Commons Math - everything from linear algebra to statistics
- Mock Javamail - mock test infrastructure for Javamail code. See also Dumpster, Smartster.
- Not-Yet-Commons-SSL - Nice, easy to use Java wrapper over OpenSSL. Encryption for the masses!
- Selenium - test your web app interaction! HTML/JS, browser-based test environment - JUnit starts playing with windows :).
- Selenium IDE - the "IDE" part may be overstating things, but this Firefox plugin generates the basis of your test code for you. See also Canoo Webtest.
- Selenium Maven plugin - self explanatory
- Sitemesh - like Tiles, but non-intrusive and heaps better. It hasn't been updated for ages because it Just Works.
- Smack - Java Jabber client
- XStream - objects -> XML -> objects translation. I can't recommend this one enough, awesome one to have in the toolbox.
- StringTemplate - like Velocity, but better.
- Ivy - this Ant plugin means that dependency management is not just for Maven any more. I worked on a big project that used this and it worked a treat.
- Subetha - a mailing list manager and embeddable mail server. See also James.
- Scriptella - extract, transform and load (ETL) tool for Java.
Feel free to add any gems that you have come across in the comments!