Follow Slashdot blog updates by subscribing to our blog RSS feed

 



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:
  • List (and reasons) (Score:5, Informative)

    by sameb ( 532621 ) on Tuesday December 14, 2004 @07:47PM (#11087726) Homepage
    In no particular order...

    Commons Logging. [apache.org] Yeah, you said you wanted to avoid extra libraries, but the overhead of commons logging is so incredibly small, and the extra libraries you'll want to otherwise use are going to require it anyway. It's a measly 28KB last I checked, and well worth it.

    HttpClient [apache.org] If you want to do any form of HTTP transfers, avoid HttpUrlConnection (built in to Java) at all costs. The HttpUrlConnection code is broken in many ways (too many to list), so you'll need another library. HttpClient does a good job of hiding the HTTP transfer behind the scenes, and has easy ways of letting you extend/change what you need.

    JGoodies Looks [jgoodies.com] Swing is getting better every day, but for that extra polish, you'll want to use the JGoodies Looks library. It does a great job of making Metal look just that much better, and also helps out the Windows L&F in some places.

    Xerces [apache.org] I'm not sure if the bulk of this is included in the latter versions of Java, but Xerces is definitely a must-have for any XML parsing.

    Other goodies...

    For rendevous (multicast DNS) support, use jmDNS [sourceforge.net]. It just works.

    If you need i18n handling (normalization, etc..), IBM's icu4j [ibm.com] does a great job.

  • My top 5 (Score:4, Informative)

    by jacoberrol ( 561252 ) <jacoberrolNO@SPAMhotmail.com> on Tuesday December 14, 2004 @07:50PM (#11087766)
    These are my top 5
    • Logging - log4j (I agree with the previous poster. Don't write log4j off)
    • Unit Test - junit
    • Xml Serialization - xstream (very light-weight and easy to use object->xml serialization )
    • Data access - iBATIS (a beautifully simple data access layer)
    • App framework - Spring (not just for the web controller... the IoC and AOP stuff is quite nice.)
  • A few I use a lot (Score:3, Informative)

    by eyeball ( 17206 ) on Tuesday December 14, 2004 @08:00PM (#11087895) Journal
    Mozilla's LDAP SDK [mozilla.org] when doing LDAP work

    The pre-1.5 concurrent threading classes [oswego.edu]

    Command-line argument handler library [apache.org]

    Log4J [apache.org] logging.
  • by Earlybird ( 56426 ) <slashdot @ p u r e f i c t ion.net> on Tuesday December 14, 2004 @09:15PM (#11088626) Homepage
    • Unfortunately, the project never gained critical mass, so it was deemed best to close it (in August, 2004).

    Wrong Commons. It's called Jakarta Commons [apache.org] and is alive and, despite a certain tendency to include crappy, hastily-thought-out and sloppily-designed implementations, generally considered well.

  • by zorkmid ( 115464 ) on Tuesday December 14, 2004 @09:19PM (#11088658)
    Maybe he meant Jakarta Commons.

    http://jakarta.apache.org/commons/index.html [apache.org]
  • Usefull libraries (Score:3, Informative)

    by Anonymous Coward on Tuesday December 14, 2004 @10:08PM (#11089040)
    We've found that the below libraries usually suit most applications:
    • log4j - Killer logging tool
    • ant - Killer build tool
    • junit - Killer unit test tool
    • xerces - XML parser
  • Re:cglib and more (Score:3, Informative)

    by DreamTheater ( 172259 ) <mark@markrichman. c o m> on Tuesday December 14, 2004 @10:56PM (#11089361) Homepage
    What's wrong with abstract base classes and inheritance? These are fundamental concepts of OO. Spaghetti code can be written in any language, regardless of these features.
  • Yajul (Score:3, Informative)

    by utahjazz ( 177190 ) on Tuesday December 14, 2004 @11:25PM (#11089553)
    Yajul [sourceforge.net] has all the the little things you normally have to write and test yourself.

    It has lots of obvious classes that you'd almost expect in the JDK like TeeOutputStream, ByteCountingOutputStream, Cache, and StringUtil.
  • My Favorites (Score:5, Informative)

    by 2starr ( 202647 ) on Tuesday December 14, 2004 @11:32PM (#11089606) Homepage
    GlazedLists [publicobject.com] - UI List/Table Manipulation

    Doug Lea's Concurrency Utilities [oswego.edu] - If you haven't yet made the plunge to Java 5.0, this is indispensable for anything thread related.

    Trove4J [sourceforge.net] - High performance collections that work with primitives. We do wire-speed packet capture and flow analysis with this stuff. 'nuf said.

  • by sameb ( 532621 ) on Wednesday December 15, 2004 @12:51AM (#11089983) Homepage
    This rationale makes sense, but ignores the plight of client apps (as opposed to server apps). When writing a client app, you want as low an overhead and as much compatability as possible. Commons Logging lets the developer have zero runtime or compile-time dependencies on heavy-weight logging systems (like log4j) or newer Java versions (like 1.4's logging system). The developers can instruct the logging to use log4j or 1.4's logger while developing, and set the layer to use a NoOpLog for shipping. Total logging overhead: 28KB (which would have been required anyway from using a library that used commons logging) and zero extra dependencies.
  • jdbc, snmp, (Score:2, Informative)

    by speculatrix ( 678524 ) on Wednesday December 15, 2004 @08:57AM (#11091385)
    stating the obvious, no server-side java is complete without a DB!

    JDBC - mysql or postgresql or oracle-classes.jar

    we, an ISP, do lots of networky stuff with SNMP; Jonathan Sevy has a nice easy to use class library:
    http://edge.mcs.drexel.edu/GICL/people/s evy/snmp/s nmp_package.html

  • by speculatrix ( 678524 ) on Wednesday December 15, 2004 @09:03AM (#11091417)
    oops, I forgot. we're on /. right, so crypto is a must-have:

    these guys know what they're doing, winning awards in a david-vs-goliath arena:

    http://www.bouncycastle.org/
  • XOM! (Score:3, Informative)

    by CraigoFL ( 201165 ) <slashdotNO@SPAMkanook.net> on Wednesday December 15, 2004 @10:25AM (#11091866)
    XOM [cafeconleche.org] is an excellent XML-handling library. It makes XML parsing, interpretation, and generation a breeze, and goes to great lengths to ensure that what you do is correct according to the XML specs. It's an absolute pleasure to use, especially compared to the "standard" SAX and DOM libraries.

    It's created by Elliotte Rusty Harold, who is one of the bigwigs in both the XML [cafeconleche.org] and Java [cafeaulait.org] arenas. XOM is at the intersection of those two sets.

    Technically it's still in "beta", but the API hasn't changed at all since the Alpha releases, and all the bugs fixed in the beta stages have been for performance boosts or to fix bugs dealing with the very fringes of XML.

    Probably the best part of the library isn't the code itself; it's the design process that went into making it. Check out the Design Principles [cafeconleche.org] for a good read.

    Craig

"May your future be limited only by your dreams." -- Christa McAuliffe

Working...