My world is without a good list of free Java libraries. What are some of your can't-live-without Java libraries?
Note: To keep this as useful as possible, please remember:
Consider highlighting or moving some of these libraries into the Java tag wiki [1].
Let's not forget the excellent Google Collections [1] library. (Edit: Google Collections was expanded and renamed to Guava [2]. You should not use the library titled "Google Collections" anymore.)
Javalobby's interview with its main developers is a good introduction: What is the Google Collections Library? [3]
Comments by
Steve McLeod
[4]:
It's gradually altering my whole coding style. Preconditions, Functions, Transformers are stupendous once you get the hang of them.
Joda Time [1] is an absolute must if you're doing anything beyond the most trivial of date computations.
Note: JSR 310 [2] aims to fix a lot of the problems with the standard Java Date and Time API.
[1] http://joda-time.sourceforge.net/JfreeChart [1] is the best freely available charting thing available on any platform.
[1] http://www.jfree.org/jfreechart/SLF4J [1]
Surprisingly, this good facade lib for logging (better than commons logging) was still missing.
[1] http://www.slf4j.org/Mockito [1] for easy testing. Allows mocking concrete classes (besides interfaces, of course) as well.
I've written unit tests for years, but Mockito and Easymock impressed me immediately.
[1] http://code.google.com/p/mockito/couldn't live without it
?? I'm pretty sure you would live just fine - Shervin
Name: XStream
Website: http://xstream.codehaus.org/
Purpose: Out of the box POJO serialization to XML and back again
Name: Guice
Website: http://code.google.com/p/google-guice/
Purpose: Dependency Injection, ease of testing
For HTML parsing, my big favourite is Jsoup [1]. Its biggest power is support for jQuery-like CSS selectors [2] to select HTML elements of interest.
Here's a kickoff example which summarizes links to all useful free third party libraries of the 1st page of this question.
Document document = Jsoup.connect("http://stackoverflow.com/questions/130095").get();
Elements links = document.select("#answers .post-text a");
for (Element link : links) {
System.out.println(link.attr("href"));
}
Result:
http://commons.apache.org/ http://code.google.com/p/google-collections/ http://guava-libraries.googlecode.com http://www.javalobby.org/articles/google-collections/ http://stackoverflow.com/users/2959/steve-mcleod http://joda-time.sourceforge.net/ https://jsr-310.dev.java.net/ http://logging.apache.org/log4j/ http://www.junit.org/ http://www.hibernate.org/ http://www.springframework.org/ http://lucene.apache.org/java/docs/ http://www.lowagie.com/iText/ http://www.jfree.org/jfreechart/ http://xstream.codehaus.org/ http://www.bouncycastle.org/java.html http://code.google.com/p/mockito/ http://code.google.com/p/google-guice/ http://www.junit.org http://tomcat.apache.org http://www.mortbay.org http://www.springframework.org http://www.hibernate.org http://sourceforge.net/projects/c3p0 http://lucene.apache.org/java/docs/ http://logging.apache.org/log4j/1.2/index.html http://commons.apache.org http://poi.apache.org http://www.pdfbox.org/ http://velocity.apache.org http://www.easymock.org/ http://www.miglayout.com/ http://www.slf4j.org/ http://www.eclipse.org/swt/ https://swingx.dev.java.net/ http://mina.apache.org/ http://www.mortbay.org/jetty/ http://testng.org/ http://www.jdom.org/ http://jakarta.apache.org/ http://delicious.com/tag/java%20library http://delicious.com/mortis/java+library http://delicious.com/robdimarco/java+library http://jasperforge.org/plugins/project/project_home.php?group_id=102 http://prefuse.org/ http://publicobject.com/glazedlists/ http://seleniumhq.org/ http://seleniumhq.org/projects/ide/ http://java.sun.com/javase/technologies/desktop/media/jai/ https://jai-imageio.dev.java.net http://www.eclipse.org/aspectj/ http://wicket.apache.org/
Extraordinary simple, isn't it? See also Pros and cons of leading HTML parsers in Java [3].
[1] http://jsoup.orgName: The Legion of the Bouncy Castle
Website: http://www.bouncycastle.org/java.html
Purpose: Security/Cryptography
Name: Miglayout
Website: http://www.miglayout.com/
Purpose: A powerful layout manager that just works
GWT [1] - If your Javascript skills are not adequate enough for stunning AJAX applications
[1] http://code.google.com/webtoolkit/SWT [1], though I haven't used it for a while. It yeilds pretty great user interfaces.
[1] http://www.eclipse.org/swt/Guess you all missed Apache POI for interaction with MS Excel !
Selenium [1] - automated UI testing (or acceptance testing) framework for web applications. Getting up to speed and making your tests stable enough for fully automated continuous integration probably won't be easy, but once you do, it's quite cool what you can do with Selenium.
In case you're totally new to this, here's a summary: You can write test cases in pure Java, JUnit-style, and when you run them, Selenium launches e.g. Firefox and does all kinds of stuff (clicks on links, types into forms, does assertions about page content, etc.) against your webapp. (This is just one way of using Selenium - you can also record tests with Selenium IDE [2], or use other languages such as Python or C# to write them.)
[1] http://seleniumhq.org/AspectJ [1] - a seamless aspect-oriented extension to the Javatm programming language.
Very useful for logging, debugging, testing and more.
[1] http://www.eclipse.org/aspectj/TestNG: http://testng.org/
It was mightily useful in creating a database driven web testing framework some years ago. JUnit was too rigid at the time to do what I needed.
These two are excellent:
Apache MINA [1] - Well-designed, high-performance, network application framework using Java NIO
Jetty [2] - Easy-to-use, full-featured, embeddable web server and webapp container
[1] http://mina.apache.org/These are all libraries I use or have used and can definitely recommend.
[1] http://www.junit.orgI'm quite partial to
JasperReports [1] - report generation libraries
prefuse [2] - visualization toolkit
[1] http://jasperforge.org/plugins/project/project_home.php?group_id=102Actually not just the commons, but all of Apache Jakarta [1] project has great Java libraries. From MS Office file access to collection utilities to byte code manipulation. The page also lists projects that have moved out of Jakarta (eg: maven).
Another place is http://delicious.com/tag/java+library [2] - several of my colleagues use that combination of tags (language + library) to organize the things they run across ( mortis [3], robdimarco [4]).
[1] http://jakarta.apache.org/Gson [1] for producing and parsing JSON.
After one day's experience with Gson, I'm pretty convinced it is the JSON library for Java that I'll be using from now on. Like other libs from Google, this seems to be high quality stuff. Check out the very good user guide [2] to get started!
[1] http://code.google.com/p/google-gson/Name: Glazed list
Website: http://publicobject.com/glazedlists/
Purpose: Data flow, instead of logic flow. Data centric. Works well with Swing
The
JGoodies Forms framework
[1], featuring the excellent (and most importantly, sane) FormLayout
layout manager for Swing.
JAI [1] - Java Advanced Imaging API it's very useful to do powerful image manipulation. Here comes Sun's description of it:
The Java Advanced Imaging API (JAI) provides a set of object-oriented interfaces that supports a simple, high-level programming model which allows images to be manipulated easily in Java applications and applets. JAI goes beyond the functionality of traditional imaging APIs to provide a high-performance, platform-independent, extensible image processing framework.
I would also recommend JAI-Image-IO [2] Tools.
[1] http://java.sun.com/javase/technologies/desktop/media/jai/Log5j [1] is a wrapper around Log4j that uses Java 5's var-args for an automatic String.format in log messages:
log.debug("IOException while reading %s", exception, file.getName());
Apache Wicket [1], POJO-based web application framework. That description is short but it's beyond powerful, check the examples from the site and you should understand why.
[1] http://wicket.apache.org/Ehcache [1] is an open source, standards-based cache used to boost performance, offload the database and simplify scalability.
[1] http://ehcache.org/H2Database [1]. Really useful during unit testing. Slightly faster than HSQL.
[1] http://www.h2database.com/Processing [1] is a pure, java based graphics and multimedia library, that has been used by even artists. I myself use it for it's simplicity and power of 3D drawing. There are many plugin libraries for it too. The speed of it's drawing and graphics manipulating capabilities are georgeous! There is a Javascript and Ruby port of it.
[1] http://www.processing.orgLiquibase [1]
For managing database updates.supports many databases and is extensible for custom requirements.
[1] http://www.liquibase.org/Rhino -- http://www.mozilla.org/rhino/
a javascript compiler/interpreter, allowing the execution of javascript within your java app.
It is exceedingly useful to dynamically generate files from templates:
Terracotta [1]
With it you can, for example, make a server-side application support clustering without having to litter your code with clustering infrastructure. You basically define "shared roots", globally distributed methods, instrumented classes (whose instances will be passed between JVMs), etc, in a configuration file, and in Java code just make sure access to those is correctly synchronized.
(Terracotta can be used in other scenarios too, but clustering is what I'm most familiar with.)
It's open source and free (for most uses at least), but commercial licensing options [2] and support are also available.
[1] http://www.terracotta.org/ASM [1], the Java bytecode manipulation framework and CGLIB [2], the code generation library. A lot of the frameworks (viz. Hibernate) here rely on ASM and CGLIB (which itself relies on ASM) to do their magic.
[1] http://asm.ow2.org/I think JNA [1] (Java Native Access) should be on the list for easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required (from the website)
We're using it for direct calls to Windows software and DLLs; it works really well and can be a huge time saver.
Greetz, GHad
[1] https://jna.dev.java.net/Jackson [1] for JSON processing: a full-featured library that does very fast streaming read/write, full data binding (lists, maps, primitives and beans, without custom code) and even dynamic tree model if that's more your style. Most libraries only offer one or two of the abstractions; do not support efficient handling of input via InputStream, or require you to work with their own non-standard types.
[1] http://jackson.codehaus.org/TutorialXOM [1]
[1] http://www.xom.nu/XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order.
For any http client tasks, we user apache's httpclient [1] library.
[1] http://hc.apache.org/httpcomponents-client-ga/httpclient/index.htmlThe Apache JXPath [1] is a great little library, yet remarkably unknown. It allows you to access Java object methods using XPath-like syntax. For example, rather than writing:
for (Person p : getCompany().getDepartment().getPeople()) {
if(p.getName().equals("Brian") {
...
You can write:
JXPath.newContext(getCompany()).getValue("/Department/People[@name='Brian']");
(A trivial example. XPath can do so much more)
It doesn't make so much sense hardcoding this, but it's very useful for configs etc.
[1] http://commons.apache.org/jxpath/DWR [1] (Direct Web Remoting) - Makes it quite easy to do Ajax calls to server-side Java code from JavaScript running in the browser.
[1] http://directwebremoting.org/What are some of your can't-live-without Java libraries?
**java.util**
It is java, it is free, it is good, and I can't live without it.
Don't make it less for live in the core :)
SLF4 [1] and Logback [2] are the best for logging. I am surprised that people are still talking about commons-logging (awful) and log4j.
[1] http://www.slf4j.org/Note: This is a duplicate of another answer [1] to this question (and that other answer has more votes as I write this, so vote up the other answer!). Notes from this answer have been merged there.
Google Collections
It's gradually altering my whole coding style. Preconditions, Functions, Transformers are stupendous once you get the hang of them.
[1] http://stackoverflow.com/questions/130095/most-useful-free-java-libraries/132639#132639Most of my faves have been mentioned (like Apache Commons, Hibernate, and Spring), but I'd like to add:
checkstyle
is a tool. - Martin Schröder
Substance [1] A nice Swing LaF.
(SLF4J removed from this answer; upvote this one [2] instead.)
[1] http://substance.dev.java.net/Jython [1]. Yes it's still alive people, and they've just released 2.5 recently. It's quite useful to call Java libraries using less verbose Python syntax in a day-to-day administrative tasks.
[1] http://www.jython.org/JAXB [1] - JAXB allows Java developers to access and process XML data without having to know XML or XML processing, validate source data against an associated schema, JAXB allows access to data in non-sequential order, but it doesn't force an application to navigate through a tree to access the data etc. etc
[1] http://java.sun.com/developer/technicalArticles/WebServices/jaxb/XMLBeans [1] - XMLBeans is a technology for accessing XML by binding it to Java types. Why work with XML when you can work with classes/objects?
[1] http://xmlbeans.apache.org/JUNG - Java Universal Network/Graph Framework [1]
Comes with many standard graphing algorithms. Provides some sane algorithms to lay out vertices in visualizations.
[1] http://jung.sourceforge.net/While not Java specific, Axis and preferably Axis 2: http://ws.apache.org/axis2/
Makes creating web services very easy and it works with a few different serialization libraries to allow objects to be sent from clients to servers without having to do any serialization on your side.
Axis 2 has a completely different set up than the original axis, but the changes are worth it.
That is if you are creating web services
I recommend the Simple XML library [1] for XML serialization. It can do virtually anything you need. Add a few annotations and you're done or you can customize everything to make it deserialize a 3rd party XML format into your classes. And, as the name suggests, it is really simple. Great documentation, under active development, top notch stuff.
[1] http://simple.sourceforge.netName: JFugue
Website: http://www.jfugue.org
Purpose: Playing music in one line of Java code
(Not the most business-minded library, but definitely great for being creative and programming for fun!)
OpenSymphony [1] has a really nice set of various open source java projects. The ones I used and enjoyed:
Both Quartz and OSCache are well integrated with Spring.
[1] http://www.opensymphony.com/akka [1] Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Actors
[1] http://doc.akkasource.org/My favorite Java library is Spring framework, and I automatically include it in any new project. This answer could be considered a duplicate of a previous post [1], but I needed to add that this library is not only "used for MVC (Model-View-Controller) projects."
The Spring "Inversion of Control" Container is a standalone lib (separate from SpringMVC) and is critical because it allows you to have cleaner, decoupled code [2]. You will always have people that decide to hard-code some database entry that will only ever work when run inside a Java app server like Websphere, but Spring allows you to configure your code so that you can do things like inject in a alternate/fake source of data. This is key to being able to write unit tests.
Another strength of core Spring is its ability to allow you to avoid traditional heavyweight J2EE code [3].
Developers take one look at EJB 2 and rightly run to any other platform such as Ruby on Rails, but you actually have a somewhat lightweight Java option with Spring. (Keep in mind that Java is verbose and if you simply can't stand boilerplate but are locked into the JVM, you can look at Grails [4] or Roo [5] or Play [6].)
Where I work, we use Struts2 + Hibernate + Spring IoC, and actually completely avoid SpringMVC, and still build solid Java webapps.
[1] http://stackoverflow.com/questions/130095/most-useful-free-third-party-java-libraries/130204#130204Hamcrest [1], from the homepage:
[1] http://code.google.com/p/hamcrest/Provides a library of matcher objects (also known as constraints or predicates) allowing 'match' rules to be defined declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules.
Dozer mapping library, very usefule going from JPA generated classes to domain classes
json-lib [1] provides convenient functionality for parsing JSON strings into/out of Java objects. This is quite helpful if you work on Ajax web apps.
[1] http://json-lib.sourceforge.net/A great substitute for ReadLine, written in pure Java, portable between platforms (specifically Linux and Windows).
[1] http://emg-2.blogspot.com/2008/03/comfortable-command-line-in-java.htmlStringTemplate [1] as a general purpose templating engine. It's simple yet ingenious...
[1] http://www.stringtemplate.org/Drools [1] - A great BRMS API. Very useful to manage your ever changing business rules.
[1] http://www.jboss.org/droolsLibrary: FlyingSaucer / XHTMLRenderer [1]
Purpose: Render XHTML / CSS to PDF or a Swing component (and do so wonderfully well!)
It's the only way I write reports anymore.
[1] https://xhtmlrenderer.dev.java.net/If you use JSF alot, then you cannot avoid JBoss Seam [1]. It is awsome! Of course it is not only required when running JSF.
It is a very nice library for Java EE. It was Seam that led to Context and Dependency injection and alot of the features in Java EE 6.
[1] http://seamframework.orgSuggested Uses: ANY time you're storing a lot of ints, chars, or longs in memory and running out of memory. Doubly useful if collections are having items added/removed/modified a lot, because these operations are much faster on primitive objects.
Also useful in cases where very predictable performance is needed and garbage collection pauses cause problems.
ANYTHING that does work with graph-style relationships between RAM-expensive objects will benefit, because you don't need to store the objects in memory, just an int or long unique identifier for each. Persist the objects to disk, and let TIntIntHashMaps store relationships. You can store 8x as many relationships in memory for the same RAM use as a vanilla HashMap.
[1] http://trove4j.sourceforge.net/I'm surprised no one has mentioned iBatis (ORM/Persistence for people who like to use actual SQL code) or JMock (mock objects).
Another vote for SWT [1]. GridLayout is so much better than Swing's GridBagLayout (of which I have nightmares about). Although, SWT has some glitches, If I have the choice, I'd always prefer SWT to Swing.
[1] http://www.eclipse.org/swt/Name: Uncommons Maths
Website: http://maths.uncommons.org/
Purpose: Generics enabled CombinationGenerator! A Random seed generator
Apache log4j
used for logging events for use with 3rd party APIs
log4j homepage [1]
[1] http://logging.apache.org/log4j/1.2/Reflections [1] - Source code runtime meta analysis; a step beyond the standard Java reflections API [2]. I've found it useful in lots of projects requiring exquisite reflectional manipulations.
[1] http://code.google.com/p/reflections/DynamicReports - an open source reporting tool [1] based od JasperReports. It allows to create dynamic report designs and it doesn't need a visual report designer.
[1] http://dynamicreports.sourceforge.netI love Jodd [1]. First, it is a small library and very fast. The jodd tools contain the set of various tools you need it everyday, and all that packed in one jar. Besides many utilities, inside you can find smaller groups of functionality, like: yet another BeanUtil library (but this one treats fields as part of the property and has some more interesting features), JDateTime that uses astronomical algorithm for tracking time and very very user friendly (ah,I hate Calendar!), Email... I like it also since you can check the code and you will immediately understand what is going on.
Besides tools, there is the second part of jodd, called jodd-wot, which contains all necessary frameworks: ioc container, interresting and different aop, database mapping, nice web framework, jtx, validation.... so everything you need to build a good web app, but with only like 7 jars:) The effects are huge, imho: my tomcat starts in seconds, memory consumption is lowever, the amount of written code is less then usual, and so on.
Downside is that you really have to explore it. API is quite good, and there is even an real-life web app example, but still, in the beginning you are not aware of whats everything inside, and the documentation can be better.
[1] http://jodd.orgSMSlib
It's a great library and wrapper for deploying SMS HTTP servers and bulk messaging through your personal mobile phone/GSM modem.
SMSlib homepage [1]
[1] http://smslib.orgFlyway [1]: I use it for as a part of continuous delivery. Let the application update its database.
[1] http://code.google.com/p/flyway/PowerMock [1]
Another mocking library for Java, but adding new very powerfull posibilities, including mocking static methods and constructor invocations. Even static methods from JRE can be mocked.
I've found myself a few times where I needed to rewrite code to enable full testing with mock (f.g. creating utility beans to replace static calls), with this library it's no longer required.
[1] http://code.google.com/p/powermock/When I need to process HTML (which normally means I can't expect it's well-formed) I usually use Jericho [1]. They have great examples on their page, from which you can quickly learn how to use it.
[1] http://jericho.htmlparser.net/docs/index.htmlThe Java Spell Checker JOrtho [1] can be use very easy with any GUI application.
Website: http://www.inetsoftware.de/products/tools/JOrtho/
[1] http://www.inetsoftware.de/products/tools/JOrtho/JDOM, for java XML parsing
http://www.servlets.com/cos/ -- servlet utils including download/upload, etc
bindings to curl for http download/upload
code from the squirrel SQL client for accessing DBs
the original JDBC driver for accessing MySQL.
it takes a while to think about all the stuff that's been useful to you over the years.
JTS Topology Suite [1]: If you work with geographic data it's very useful. It's so useful, also C++-programmerswant it, so it was ported to C++, a library named GEOS [2] (Geometry Engine Open Source).
[1] http://www.vividsolutions.com/jts/jtshome.htmHtmlUnit
http://htmlunit.sourceforge.net/ for unit tests and scraping of websites
Jep [1] is a very good Java library for parsing and evaluating mathematical expressions.
[1] http://www.singularsys.com/jep/Restlet [1] is an excellent framework for building and/or working with RESTful systems. I've been using it in many production systems for years and it's been a huge boon.
[1] http://restlet.orgNobody mentioned Java image utilities [1]??
A Java library for loading, editing, analyzing and saving pixel image files.
It supports various file formats.
Provides demo applications for the command line. It has AWT GUI toolkit too.
[1] http://sourceforge.net/projects/jiu/Jruby [1] is a pure-Java Implementation of Ruby [2] programming language
[1] http://jruby.org/jDBI [1] for simple, safe, no-nonsense relational data access (esp. for simpler use cases than what Hibernate et al are good for). For some reason it is not very well known, but it is an absolute pearl.
[1] http://jdbi.org/http://www.unitils.org/summary.html
I had a need to perform deep equality checks within my test cases. The commons EqualsBuilder.reflectionEquals didn't go deep. The "assertReflectionEquals" feature provided by unitils was a life saver. I didn't have to write equals methods for all my classes and the generated error message when objects don't equal precisely identifies the attributes. This is the best deep equals utility I was able to find.
JGraphX [1] is a very useful library/framework for visualizing / editing networks/graphs. Perhaps less sophisticated for visualization than Prefuse, but very good for creating the graphs in the first place.
[1] http://www.jgraph.com/jgraphx.htmlJOpt Simple [1]
For parsing command line options, similar style to Unix commands. The API is simple, while offering an immense feature set [2].
[1] http://jopt-simple.sourceforge.netjawr [1] - "Minifies" and compresses Javascript (and CSS) on the fly. It even has development flags you can set to disable compression and minification to allow you to debug readable Javascript. Also integrates with DWR!
[1] http://jawr.dev.java.net/PCJ [1], Primitive Collections for Java.
This is a the fastest implementation of a Collections framework around primitive datatypes, providing for example Maps with ints as keys or Lists for floats. Much faster and more memory efficient than Sun's classes (where you have to use Integer and Float as wrappers with substantial cost), and also faster than its "competitors" fastutil [2] and trove [3]. Unfortunately no generics and not being maintained anymore - is stable though.
[1] http://pcj.sourceforge.net/Some of the stuff we used:
Annotation library for generating getter/setter/constructor/hashcode/equals/tostring Easy configuration of various Loggers, implementation of val: Lombok [1]
Love contract-oriented programming? Use cofoja [2]
Want a web-app running in 5 minutes or do not want tons of XML/config files? Play [3]!
Scrape web pages with 2 lines of code using JSoup [4]
High performance library for primitive-collections - fastutils [5]
[1] http://projectlombok.org/Tritonus [1] is an OpenSource alternative to the standard Java Sound API. Tritonus supports all of the features of the Sound API, and more.
Among other things, it supports use of the Alsa sequencer instead of the system's one.
[1] http://www.tritonus.org/Apache Camel [1]
Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration.
[1] http://camel.apache.org/JGroups for multicast communication http://www.jgroups.org/
Apache-commons [1] if you need a lot of utilities that the Java standard library left out (e.g., collections, XML, etc.)
JMS (can also get as part of J2EE) if you need to reliable send messages from one machine to another and don't want to deal with the hassle of maintaining your own queues.
I'm also a fan of SWT for GUIs (mostly used as part of the Eclipse project)
[1] http://commons.apache.org/Castor for Java-XML binding
A port of apache collections with parameterization: http://larvalabs.com/collections/
I feel like there is another one of these too, but I can't think of it.
It's a lightweight annotation-driven presentation framework.
A superb templating engine.
[1] http://www.stripesframework.org/JAXB [1] is nice.
jFreeChart [2] is great for charts.
Spring is also very nice.
[1] https://jaxb.dev.java.net/Name: Functional Java
Website: http://code.google.com/p/functionaljava
Purpose: Provides first-class functions, generic compound types, immutable (persistent) data structures, lazy (infinite) lists, parser combinators, actor concurrency, specification-based testing, flexible replacements for toString(), equals(), and hashCode(), and more.
RichFaces [1] is an open source framework that adds Ajax capability into existing JSF applications without resorting to JavaScript, with a huge library of rich components and skinnability support.
[1] http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html%5Fsingle/index.htmlI find this to be a good list of free Java libraries http://java-sources.org/
Markdown-Doclet [1] for including Markdown syntax in Javadocs rather than HTML.
[1] http://code.google.com/p/markdown-doclet/Nekohtml [1] - tidy up html into xml document for data processing (xpath/xslt)
TagSoup [2] - a SAX-compliant parser written in Java that, instead of parsing well-formed or valid XML, parses HTML as it is found in the wild
[1] http://nekohtml.sourceforge.net/Jpcap [1] - Using Jpcap, you can develop applications to capture packets from a network interface and visualize/analyze them in Java
[1] http://jpcap.sourceforge.net/Name: JXTA
Website: https://jxta.dev.java.net/
Purpose: Allows developing highly scalable P2P communication networks among applications without coding everything from scratch.
PMD [1]. For helping finding those bad practices code. Really useful to make your code beautiful.
[1] http://pmd.sourceforge.net/API for Go-related applets and applications.
[1] http://www.davidjarvis.ca/jigoI've found AjaxTags [1] very useful for DisplayTag updates without page refreshes and building servlet based autocompletes. It's one of several libraries for ajax development with minimal javascript coding. The site also has some great demo to try out.
[1] http://ajaxtags.sourceforge.net/I use jcharts quite a bit. Great for creating a variety of graphics.
Name: ACM Java Task Force Library
Website: ACM Java Task Force Library [1]
Purpose: To review the Java language, APIs, and tools from the perspective of introductory computing education and to develop a stable collection of pedagogical resources that will make it easier to teach Java to first-year computing students without having those students overwhelmed by its complexity.
Strengths:
A simple object-oriented model for programs.
The Program class defined in the acm.program package offers an easy-to-use model for writing simple programs. In addition to hiding the static main method, the Program class and its standard subclasses provide a highly intuitive example of object-oriented class hierarchies.
A model for input and output that treats traditional console I/O and dialog I/O symmetrically.
The acm.io package defines the classes IOConsole and IODialog that share a common interface for all input-output operations. This design addresses the lack of a simple input mechanism in a way that emphasizes the value of interface-based design.
An extensive library of graphical objects.
The acm.graphics package implements a simple but extremely powerful model for creating graphical pictures based on the metaphor of a felt board in which students construct graphical objects of various types and place them on a canvas. This design emphasizes the use of objects and frees the student from having to respond explicitly to repaint requests.
A minimal set of new classes to support development of graphical user interfaces.
The acm.gui package includes a small set of classes to bring Java’s extensive GUI-development resources within reach of novice programmers.
Backward compatibility for applets.
Unlike most Java code today, programs developed using the JTF packages can typically be executed as applets even on older web browsers. This flexibility makes them ideal for web-based teaching tools and lecture demonstrations.
JavaBuilders [1] -- lets you specify creation/parameters/bindings of a GUI layout in a succinct format; flavors exist for Swing, SWT, and GTK+.
[1] http://code.google.com/p/javabuilders/Surprised to see not much of JBoss stuff here apart from Hibernate.
Anyways, one of my favorite tools is Drools/JboosRules engine.
Not sure how many use Antlr, but I require it lot of time.
JGAP [1] - It's a package for doing genetic programming quickly and easily. I was able to use it the first time and had an answer to a question in four hours that humans had previously spent days on and not gotten nearly as good an answer.
If you need to answer questions about efficiency (fastest, cheapest, least distance, etc.) or even if there is any solution at all with a given set of constraints within a complicated system involving lots of variables then JGAP is your best friend in the world. Don't automatically assume it's just for academic wonks, it's every bit as applicable in real world circumstances.
[1] http://jgap.sourceforge.net/Apache Xalan.
It's buggy and shabby, but we absolutely can't live without it.
I've used JHotDraw [1] for a few projects. It's a great 2D graphics framework for structured drawing editors.
[1] http://sourceforge.net/projects/jhotdrawPiccolo2D [1] (formerly Piccolo)
Toolkit for development of 2D structured graphics programs, in general, and Zoomable User Interfaces (ZUIs), in particular. Good for highly interactive user interfaces.
[1] http://www.piccolo2d.orgBIRT [1] - I see Jasper Reports mentioned but having gone through an evaluation I prefer BIRT.
[1] http://www.eclipse.org/birt/phoenix/This is really subjective, but you can't go wrong with this stack.
Guice for IOC Container (better Java code)
Spring IOC Container (better Java code)
Hibernate
iBatis
Lucene (awesome indexing software)
SWT
iText
xhtmlrenderer
junit
tomcat
jetty
apache-commons
Apache Wicket
Drools
sitemapgen4j [1] - very helpful if you are building sitemap generator for your website. Supports sitemap compression and multiple archive files. Saved me lot of work.
[1] http://code.google.com/p/sitemapgen4j/simplecaptcha [1] is a simple framework for generation of CAPTCHA image/answer pairs that help strengthen security of login and registration forms. It supports internationalization, and is quite simple to use and customize.
[1] http://simplecaptcha.sourceforge.net/In recent projects Apache FOP has been used extensively. I'm surprised I couldn't find it anywhere in this list ...
Website: Apache FOP [1]
Purpose: FO (Formatting Objects) Processing; meaning that in most cases data in xml is transformed to xsl-fo and then processed to output to a pdf or postscript or ..
[1] http://xmlgraphics.apache.org/fop/QueryDSL [1] enables the construction of type-safe SQL-like queries for multiple backends including JPA, JDO and SQL in Java.
[1] http://www.querydsl.com/tika -parser library for almost all kind of text formats and also extracts metadata from audio/video. supported formats [1]
[1] http://tika.apache.org/0.7/formats.htmlXMLUnit [1] — Extension lib for JUnit that can simplify all kinds of XML-related unit tests.
I've used it e.g. to verify correctness of generated XML using XPath expressions. Examples:
XMLAssert.assertXpathExists("//category[@label='2/2011']", document);
XMLAssert.assertXpathEvaluatesTo("3", "count(/result/row)", docString);
// test that all input fields have an id:
assertXpathValuesEqual("count(//input[@id!=''])", "count(//input)", document);
Curious that this wasn't mentioned yet (though there were 176 older answers); XMLUnit definitely is useful and should be on this list.
[1] http://xmlunit.sourceforge.net/jsch.jar [1] provides support for secure remote login, secure file transfer, and secure TCP/IP and X11 forwarding. It can automatically encrypt, authenticate, and compress transmitted data
[1] http://www.jcraft.com/jsch/Apache Derby [1] - Relational SQL database written in Java.
I know you can install it with JDK, but I usually download it separately, because the version on the website changes much more rapidly than version that you can install with JDK.
[1] http://db.apache.org/derby/Name: XSOM [1] (by Glassfish)
Licence: CDDL (which basically allows you free use and redistribution with your application) and GPL v2
Purpose: Parse XSD more easily than with JDOM or similars
[1] http://xsom.java.net/Beanshell [1]. Scripting framework that is planned to be eventually integrated in the the J2SE and when JRE Lambda expressions [2] are finally implemented , then this will become very powerful. ;-)
[1] http://www.beanshell.org/GlazedLists [1] to make working with large datatsets painless, especially when it involves filtering, sorting, transforming, and using as models for swing components.
[1] http://www.glazedlists.comFlanagan's Scientific Library [1] has some helpful aspects for scientific computing in Java, e.g. (weighted) Regression [2]
[1] http://www.ee.ucl.ac.uk/~mflanaga/java/JADE [1] - Java Agent DEvelopment Framework
an open source platform for peer-to-peer agent based applications. It's fully compliant with the FIPA specification -Foundation of Intelligent Physical Agents- and provide a set of graphical tools that support the development, deployment, and debugging phases. The agent platform can be distributed and controlled through a remote GUI.
A little raw but yet powerful GUI [2]s
I used this for my master thesis. Thanks!! You know who you are! ;)
See also WADE [3] - Workflow and Agents Development Environment
A JADE based platform that provides support for the execution of tasks defined according to the workflow metaphor. This I haven't used...
[1] http://jade.tilab.com/JAXB [1]
For xml marshalling and demarshalling .. It just an another good java api...
[1] http://www.oracle.com/technetwork/articles/javase/index-140168.htmlName: Weld
Website: http://seamframework.org/Weld
Purpose: Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform.
Two that haven't been mentioned that I love and use extensively here at BranchOut:
Jackson [1], Tatu Saloranta's excellent JSON marshaling/unmarshaling library.
Metrics [2], an unobtrusive, simple, and extremely useful metrics collection library, written by Coda Hale.
[1] http://jackson.codehaus.org/MessAdmin [1], a fantastic HttpSession administration tool, and giving detailed statistics and informations on any Web application. It installs as a plug-in to any Java EE WebApp, and requires zero-code modification.
[1] http://messadmin.sourceforge.netIt is a bit subjective, something you can't live without might be useless for me... :-)
Anyway, here are some I bookmarked (I haven't used all of them!):
There is lot more, that's one of the strong points of Java...
[1] http://xmlgraphics.apache.org/batik/Name: Lipermi
Website: http://lipermi.sourceforge.net/ WARNING: Use the CVS version for now, it fixes two major bugs.
Purpose: RMI alternative that uses only TCP. No more codebase urls!
WAX [1] for writing XML documents with less code.
[1] http://java.ociweb.com/mark/programming/WAX.htmlProcessing was quite useful for me. http://processing.org/
I love me some JScience [1]. Makes a number of scientific tasks (for me, it was unit conversion) very easy.
[1] http://jscience.org/Castor [1] - Castor is an Open Source data binding framework for Java[tm]. It's the shortest path between Java objects, XML documents and relational tables. Castor provides Java-to-XML binding, Java-to-SQL persistence, and more
[1] http://www.castor.org/I've just discovered Fest Assertions [1] recently and instantly started using it in my day to day programming. And already noticed profits of doing so.
Assertions can become quite complex and verbose in non-trivial unit tests. Fest Assertions is testing/assertions library that allows to write assertions using syntax similar natural language. For example:
assertThat(list).hasSize(4).contains(obj1,obj2).excludes(obj3);
This is also a good example to show that multiple assertions can be made in one line (they are AND-ed in that case, i.e. all of them must pass) which makes them much more compact.
I'm surprised that Hamcrest [2] - which I believe is far inferior (I say so after checking both of them of course) - is mentioned and voted up here (and seems to be generally much more popular) and FEST Assertions wasn't.
Three main advantages of Fest Assertions over Hamcrest are:
So don' wait any longer. Include FEST Assertions in your unit tests!
[1] http://code.google.com/p/fest/Java Advanced Imaging http://java.sun.com/javase/technologies/desktop/media/
HttpComponents Client [1] has some useful Api's like legacy HttpClient, and new HttpCore ,HttpComponents Client and Asynch HttpClient to expand the role of the HTTP protocol beyond user-driven web browsers
[1] http://hc.apache.org/la4j - Linear Algebra for Java [1] - 100% single-threaded sparse and dense matrix library.
[1] http://code.google.com/p/la4j/I would recommenend TreeMap [1].
As described on the website, it "shows efficiently tree data as a rectangle colored map. Useful to monitor thousand of files in a little window."
Licensed by: Geeknet, Inc.
You may also view it in more detail here [2].
[1] http://sourceforge.net/projects/treemap/I even work with:
[1] http://ant.apache.orgHere are my choices.