Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java Programming Technology

What are Some Essential Java Libraries? 77

rleclerc writes "I would like to ask those 'Javaniers' in the Slashdot community what they thought were essential non-standard libraries that every Java coder should have. Normally I roll my own when it comes to that type of thing and simply build on whats available in the foundation classes. However, recent work has pushed me toward looking at some scientific libraries and I thought I would find out what libraries others in the Java community would consider an essential weapon in their Java arsenal. A few that I am looking at are the Cern scientific libraries and the Apache Commons Collections libraries. To avoid extra libraries I have opted to use the Java logging rather than the Apache one. Anyone like to add anything to the list?"
This discussion has been archived. No new comments can be posted.

What are Some Essential Java Libraries?

Comments Filter:
  • by Pengo ( 28814 ) on Tuesday December 14, 2004 @08:04PM (#11087927) Journal

    First, make a plan of what your trying to do.. then go browse apache Commons.

    There have been many times I got through a project, or part way into it.. and realized I could of saved a TON of time by using a tool from that resource.

    If your doing anything with XML, it's worth taking a look at JDom.

    Make sure your using Eclipse, and if your doing web based projects.. I highly recomend http://myeclipseide.com. I have been a subscribe for a while, and have really enjoyed the enhancements that their modules bring for web development.

  • cglib and more (Score:4, Interesting)

    by Earlybird ( 56426 ) <slashdot @ p u r e f i c t ion.net> on Tuesday December 14, 2004 @09:08PM (#11088569) Homepage
    cglib [sourceforge.net], a library that lets you do metaclass programming efficiently in Java; it's similar to java.lang.reflect.Proxy, but more flexible and compiled to bytecode. Cglib is commonly used to create decorators -- for example, Hibernate uses it to generate proxies, to transparently track whether persistent objects have changed in memory and must be re-saved to the database -- but there are other uses, such as mimicking the mixin pattern.

    Xalan [apache.org] for XSLT and XPath processing. Here's a tip: Never, ever use SAX for XML parsing of application-specific data structures. SAX is a nice low-level interface for building upon, but unless you're programmatically emitting a document from scratch, it's painful to use -- you always end up writing a stack-based content handler to keep nesting state. XPath makes parsing a breeze.

    JGroups [jgroups.org] (formerly JavaGroups) is a protocol stack for building reliable, fairly efficient network communications based on, among other things, multicast IP. The entire stack is user-defineable, so you can pick and choose the level of reliability and which features you want (TCP support, pinging, group membership management etc.).

    Lucene [apache.org] is a text-indexing engine. It's actually pretty crap, and does not scale very far (we're talking a few seconds for result sets of only a few thousand documents), and the code is pure spaghetti (abstract base classes! Inheritance!), but if you need a little indexing engine or some decent text tokenization classes, and your performance requirements are modest, it works well enough.

    SableCC [sablecc.org] is a good BNF-based parser generator that generates type-safe parse trees that can navigated at runtime. Unlike the more well-known JavaCC [java.net], it's easy to get started, not least because the BNF-like grammar is so simple.

  • My most favourite (Score:4, Interesting)

    by Lao-Tzu ( 12740 ) on Tuesday December 14, 2004 @11:49PM (#11089682) Homepage

    I'm currently building a variety of petroleum engineering tools in Java. Here are the libraries I've found most useful:

    JFreeChart [jfree.org] - for all your plotting needs. Robust, quick, and fairly bug free. Not perfect, but hackable.

    iText [lowagie.com] - a free Java PDF library. My preferred method for creating reports, especially since a lot of my output needs to be e-mailed or submitted to the government, not printed out.

    JAMA [nist.gov] - a Java Matrix package. The fact that this library has a working singular value decomposition has saved me bunches of time programming a boring and tricky algorithm. I guess it has other stuff, too.

  • by michaelggreer ( 612022 ) on Wednesday December 15, 2004 @12:23AM (#11089855)
    However, in the most common case YOU are the developer using the library. Only use commons logging if you plan to redistribute your work as a library for others. If you are building an app, _do not use it_. The dev who designed it said so himself.
  • by Anonymous Coward on Wednesday December 15, 2004 @12:58AM (#11090014)
    DynaBean, RowSetDynaClass and ResultSetDynaClass are IMHO better than any other DAO. They work like java beans. but unlike statically defined java beans they can have arbitrary number of fields. DynaBean is a dynamic-DAO without code gen. the fields are defined according to ResultSetMetadata. if your resultset has 10 columns the bean has 10 fields. if your resultset is from a 10+15 table join you have 25 fields in the bean. you can turn the beans into an xml representation. it lacks compile type field name checking but it throws exception when you get the name wrong. everybody in my team has praised DynaBeans for the duration of their first project of using it, and cursed those who used other forms of DAO code gen.

    http://jakarta.apache.org/commons/beanutils/api/ or g/apache/commons/beanutils/RowSetDynaClass.html

    to cache the resultset in memory use RowSetDynaClass
    to use a server side cursor use ResultSetDynaClass
  • Fastutil (Score:2, Interesting)

    by BoxedFlame ( 231097 ) on Wednesday December 15, 2004 @06:05AM (#11090955) Homepage
    fastutil [unimi.it] is what Jakarta Commons Collection should've been: an actually competent implementation of truly type safe containers.

    MG4J [unimi.it] from the same place is pretty interesting too.
  • Re:JDOM.org (Score:2, Interesting)

    by chazman00 ( 321337 ) on Wednesday December 15, 2004 @05:08PM (#11096801) Journal
    XOM [cafeconleche.org] is even easier.

Today is a good day for information-gathering. Read someone else's mail file.

Working...