Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

What are Some Essential Java Libraries?

Cliff posted more than 9 years ago | from the additions-to-programming-toolkits dept.

Java 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?"

Sorry! There are no comments related to the filter you selected.

Libraries (2)

thatjavaguy (306073) | more than 9 years ago | (#11087605)

For server based applications JMX is a must.
Don't write off log4j.

Spring is very good indeed.

Re:Libraries (0)

Anonymous Coward | more than 9 years ago | (#11114005)

Apache Velocity is proving priceless for me in any templating situation.

List (and reasons) (4, Informative)

sameb (532621) | more than 9 years ago | (#11087726)

In no particular order...

Commons Logging. [] 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 [] 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 [] 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 [] 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 [] . It just works.

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

Re:List (and reasons) (1)

technomom (444378) | more than 9 years ago | (#11088592)

I agree but with one change. JDOM is far easier to use than xerces. Also, the swt GUI tools in Eclipse are a nice improvement over swing.


Re:List (and reasons) (0)

Anonymous Coward | more than 9 years ago | (#11091510)

I think that's a good call, but I'd like to point out that JDOM is a library that sits on top of Xerces (or another DOM/SAX implementation). There are also other 'easy' libraries that inhabit a similar niche, such as dom4j [] and one that I use quite a bit, XOM [] . If you have to work with XML documents, mucking about in their innards, you probably want one of these libraries around. They're all XML Object Models, but they're not nearly as painful to use as the W3C DOM (which Xerces includes). But I also wouldn't want to use any of these libraries with Crimson as the underlying parser (which is what ships with the Sun JDK 1.4 series). Xerces *tends to* be more correct and robust.

Commons Logging is crap (0)

Anonymous Coward | more than 9 years ago | (#11089459)

Commons Logging isn't a logging library, but a logging layer. It has been perpetuated by idiots for idiots. Even the authors admit that it's bad, but they did it to solve a political problem (which logging API to use in an OSS project).

See: hr istmas_commons_commons_logging g_ revisited

Re:Commons Logging is crap (1)

sameb (532621) | more than 9 years ago | (#11089712)

It's not just a political problem. If you're using different libraries, the libraries are going to use different loggers. log4j is too large to bundle with client apps and not necessary for many apps. Commons Logging is a simple layer that libraries can use and leaves the actual implementation decision to the developer using the library.

Sure, it's not a logging system -- but it's a damned fine logging layer.

Re:Commons Logging is crap (2, Interesting)

michaelggreer (612022) | more than 9 years ago | (#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.

Re:Commons Logging is crap (2, Informative)

sameb (532621) | more than 9 years ago | (#11089983)

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.

Re:Commons Logging is crap (0)

Anonymous Coward | more than 9 years ago | (#11095802)

here's how I turn of logging:

sed s/System.out.println*// src/*

Re:Commons Logging is crap (1)

ggeens (53767) | more than 9 years ago | (#11090804)

On Websphere, commons-logging plugs into Websphere's own logging facility. I do all my logging that way. If I ever need to deploy the application to another application server, I'll just need to configure log4j or JDK 1.4's logging.

Apart from that, it's a light-weight library, easy to use (very similar to log4j).

Re:List (and reasons) (1, Insightful)

Anonymous Coward | more than 9 years ago | (#11089825)

The HttpUrlConnection code is broken in many ways (too many to list), so you'll need another library.

How many other classes in the Java standard library are the same way? I'm trying to formulate a position on whether Java would've been better off to not have so many classes by default and rely on some other process to build a big armory of classes (like Perl), or if they indeed took the right path by having so many classes by default (it means companies can build on a huge amount of code that comes directly from Sun, with clear licensing terms, etc).

For now, I tend to believe the former, but then again, I quit using Java so much after I gained a better grasp of C, which happened several years ago. Your knowledge is more current than mine, and I'd appreciate your opinion.

Re:List (and reasons) (2, Insightful)

sameb (532621) | more than 9 years ago | (#11090043)

It's a tough question. Many of the built-in Java classes work wonders, and by building them in, it lets other built-in classes make use of them instead of having to build their own versions. One example is the Collections API. Sure, there could be things added/removed/changed with the API and things like ArrayList, LinkedList, HashMap, TreeSet, etc... but by including them, other necessary stuff can be simpler because they don't have to worry about a simple list or queue.

The remaining object-oriented problem with most OO languages is that object construction is not easily object-oriented. Java's gotten around this by using service providers (for things like crypto and other places), but most SPI interfaces are bulky and difficult to use. Unless all classes use the SPI for object creation, the largest benefit is lost. A way of having 'new ArrayList()' return my ArrayList instead of Java's ArrayList would allow pre-existing classes to make use of later optimizations in different libraries.

What I've found with many of the Java classes is that they're good for the designed scenario. HttpUrlConnection, for example, breaks if the server accepts the connection and disco's without sending any data (the connection just hangs in this instance) -- but in the vast majority of Java apps, this is never going to happen. Any robust implementation, though, needs to handle this scenario. Things like StringTokenizer are also great for simple & quick manipulation of string tokens, but are terribly inefficient.

IMHO, Java's done an excellent job of providing an API that gets the job done 90% of the time. For that other 10%, you need external libraries.

Re:List (and reasons) (1)

man_ls (248470) | more than 9 years ago | (#11099475)

StringTokenizer is useless...

String[] tokens = wholeString.split("regex");

will do the same thing, a lot more efficiently.

number of tokens? tokens.length.

Plus, it's a single line to tokenize the string that way, rather than dealing with new StringTokenizer(), getnexttoken, etc.

Re:List (and reasons) (1)

skyman8081 (681052) | more than 9 years ago | (#11123342)

Please, please tell that to the college board.

Re:List (and reasons) (1)

oever (233119) | more than 9 years ago | (#11090728)

Castor [] will do generate Java classes from you XML Schema and make XML IO and validation easy. The support for Schema is not 100% (some simple types are missing and not support for keys) but overall it's a great help for avoiding writing boring IO code.

jython (1)

Anonymous Coward | more than 9 years ago | (#11087763)

jython []

My top 5 (4, Informative)

jacoberrol (561252) | more than 9 years ago | (#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.) (2)

zhenga (770390) | more than 9 years ago | (#11087772)

JDOM for processing and manipulating XML, real easy to use. (2, Interesting)

chazman00 (321337) | more than 9 years ago | (#11096801)

XOM [] is even easier.

My last couple... (3, Insightful)

(H)elix1 (231155) | more than 9 years ago | (#11087818)

The last several projects have included jakarta-regexp-1.3.jar. Yes, if you are lucky enough to be able to count on using JDK 1.4 you have another option. One jar and you are golden for regular expressions.

The other is import org.apache.xpath.XPathAPI; My god is it nice to be able to say

NodeList nl = XPathAPI.selectNodeList(doc, "config/adapter/config/property[@name='foo']");

than the normal horking about with SAX or DOM parsers.

Re:My last couple... (1)

the hermit (176716) | more than 9 years ago | (#11091529)

I've found that the only really working regex library is jregex. All the others just have too many bugs (even the builtin jdk1.4 one). In most of them split can't handle empty fields.

-the hermit

Before any project... (2, Interesting)

Pengo (28814) | more than 9 years ago | (#11087927)

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 I have been a subscribe for a while, and have really enjoyed the enhancements that their modules bring for web development.

Re:Before any project... (1)

Zarf (5735) | more than 9 years ago | (#11088562)

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

Bad mojo man...

From the site:

Unfortunately, the project never gained critical mass, so it was deemed best to close it (in August, 2004).

Looks like you'll have to find a new way to start projects. Bummer.

Re:Before any project... (3, Informative)

Earlybird (56426) | more than 9 years ago | (#11088626)

  • 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 [] and is alive and, despite a certain tendency to include crappy, hastily-thought-out and sloppily-designed implementations, generally considered well.

Correction: Jakarta Commons, not Apache Commons. (0, Redundant)

Pengo (28814) | more than 9 years ago | (#11089280)


First Stop Apache Jakarta (1)

PBPanther (47660) | more than 9 years ago | (#11088308)

My top 3 (well 4 actually) would be:
  • commons_lang
  • commons_logging + log4j
  • JUnit

The rest depends on the frameworks I am using and the project.

I used to roll my own, but now I tend to do a web search for what I want before resorting to building my own.

cglib and more (3, Interesting)

Earlybird (56426) | more than 9 years ago | (#11088569)

cglib [] , 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 [] 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 [] (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 [] 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 [] is a good BNF-based parser generator that generates type-safe parse trees that can navigated at runtime. Unlike the more well-known JavaCC [] , it's easy to get started, not least because the BNF-like grammar is so simple.

Re:cglib and more (3, Informative)

DreamTheater (172259) | more than 9 years ago | (#11089361)

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.

Re:cglib and more (1)

Earlybird (56426) | more than 9 years ago | (#11091728)

  • What's wrong with abstract base classes and inheritance?

Nothing -- if you use them correctly. In the case of Lucene, there is no clear separation between interface and implementation, and the implementation itself frequently violates good design principles such as separation of concerns and encapsulation. (The author of Lucene also seems ignorant of the fact that Java has an interface keyword. Pure abstract base classes have their place in MI languages like C++, of course.)

Re:cglib and more (1)

bay43270 (267213) | more than 9 years ago | (#11091759)

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.

Because inheritance breaks encasulation. When given the choice between composition and inheritance, you should always choose composition. With a well encasulated library, you won't need to dig into the source. Chances are, with a lot of inheritance, you'll need the original library source even for the most basic use of that library.

Re:cglib and more (0)

Anonymous Coward | more than 9 years ago | (#11124997)

Because inheritance breaks encasulation. When given the choice between composition and inheritance, you should always choose composition. With a well encasulated library, you won't need to dig into the source. Chances are, with a lot of inheritance, you'll need the original library source even for the most basic use of that library.

Nonsense. There is nothing about inheritance that inherently breaks encapsulation, and many folks, including myself, have inherited from classes without ever looking at their source. If you have had this need, then perhaps you a) needed better documentation or b) were using the library to do something for which it was not designed. The rule is "prefer composition", not "always choose composition".

Re:cglib and more (1)

rowanxmas (569908) | more than 9 years ago | (#11091053)


some resources to consider are (1)

museumpeace (735109) | more than 9 years ago | (#11088611)

"Patterns in Java" in 2 volumes from JWiley...this is midway between the library and DIY. The library may not exactly meet your need and you will spend some time reading code and hacking or building a layer on top of the library. And DIY, as you know, is always started as a Quick and Dirty project that quickly proves less Q and more D than is the most work. And a pattern, assuming you find one that fits your needs, brings experience or understanding of the problem to your project that a library has but hides in its code
Personally, I have always longed for someone to do the work of rewriting the great old "Numerical Recipes in C" [Cambridge press] for the Java crowd. [or has it been done but BookPool just forgot to spam me about it?]

Python (-1, Offtopic)

Fished (574624) | more than 9 years ago | (#11088934)

Not too try to steal Java's thunder, but I would be interested in anyone's answers to the same question for my preferred environment: python. Anybody?

Usefull libraries (3, Informative)

Anonymous Coward | more than 9 years ago | (#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

Text I/O and processing (1)

magefile (776388) | more than 9 years ago | (#11089475)

One of the easiest ways I've seen to do text IO and processing is to just write some stubbies in Jython - to open a file, write to it, etc. Regex stuff can be simplified this way too. Basically, just a wrapper class.

Caveat: I haven't used Java since about 1.3, and I hear they've improved the text APIs significantly in 1.4 (or was it 1.5?).

Yajul (2, Informative)

utahjazz (177190) | more than 9 years ago | (#11089553)

Yajul [] 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 (4, Informative)

2starr (202647) | more than 9 years ago | (#11089606)

GlazedLists [] - UI List/Table Manipulation

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

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

Re:My Favorites (1)

Smoking (24594) | more than 9 years ago | (#11091237)

The GlazedLists lib looks really cool...
What would be even cooler is an equivalent JSP taglib...
Does anyone know if such a component exists ?

Re:My Favorites (1)

swankjesse (675497) | more than 9 years ago | (#11098107)

You can use Glazed Lists without Swing. All you need to do is grab an EventList for use in a JSTL forEach tag.

Jetty (0)

Anonymous Coward | more than 9 years ago | (#11089663)

Jetty [] for web server based projects.. FreeBSD...

My most favourite (3, Interesting)

Lao-Tzu (12740) | more than 9 years ago | (#11089682)

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

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

iText [] - 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 [] - 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.

Freemarker (1)

fearanddread (836731) | more than 9 years ago | (#11089889)

Most of the big ones have already been touched on.

A couple of template packages that are good:
Freemarker []
Velocity [] .

And if you need to perform pdf manipulation: Big Faceless Java PDF Library [] It's not free but it's a really nice package

Re:Freemarker (1)

desdemona (126153) | more than 9 years ago | (#11090492)

Don't use Velocity. It is a nice, simple template language, but you suddenly bang your head against its limitations. Mainly, it's only got macros, not composable procedures, which makes life a pain in the arse.

I haven't used FreeMarker, but it claims to fix that kind of stuff. Next time...

Re:Freemarker (1)

ebash (530208) | more than 9 years ago | (#11091013)

Another templating package is Jelly [] the avantage is that it uses a syntax that's quite similar to JSLT.

Re:Freemarker (1)

anomalous cohort (704239) | more than 9 years ago | (#11092020)

Interesting, this is the first post I could find that mentions any framework libraries. Does everyone here just use straight JSP?

I would be interested in /.er's opinions on framework libraries such as struts [] and hibernate [] . (0)

Anonymous Coward | more than 9 years ago | (#11089924)

Reflection helper class []

This class lets you do basically any reflection using one line of code (call a method, get/set a protected variable). It caches the Methods and Fields so repeated access is sometimes as little as 1/2 the speed of a statically defined method call. This should be in the JDK core.

org.apache.commons.beanutils (1, Interesting)

Anonymous Coward | more than 9 years ago | (#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. or g/apache/commons/beanutils/RowSetDynaClass.html

to cache the resultset in memory use RowSetDynaClass
to use a server side cursor use ResultSetDynaClass

A quote: (-1, Troll)

schnits0r (633893) | more than 9 years ago | (#11090060)

Java: the elegant simplicity of C++ and the blazing speed of Smalltalk

I'll see that quote, and raise you another (2, Insightful)

dark404 (714846) | more than 9 years ago | (#11090220)

C++: As powerful as assembly, and as easy to use as... assembly.

Geez, just use the real quote (0)

Anonymous Coward | more than 9 years ago | (#11093187)

It's famous and you butchered it. Here goes.
C: a language that combines all the elegance and power of assembly language with all the readability and maintainability of assembly language.

Now that wasn't so hard now, was it?

Re:Geez, just use the real quote (0)

Anonymous Coward | more than 9 years ago | (#11093220)

My favorite bit is that they modified the butcher 3: Insightful. Ah Slashdot. Brains not included.

parent is not troll (1)

themusicgod1 (241799) | more than 9 years ago | (#11093974)

humour does not a troll constitute. mabye -1 Unfunny, or -1 overrated(joke has been used too much) but 1 troll? mods put down the crack pipe, or start sharing.

POBS (1)

mwvdlee (775178) | more than 9 years ago | (#11090639) is ofcourse the ultimate library you need, it should be part of Java.

Apache offers a lot of good tools, most of which are considered "standard". Jakarta Commons and Xerces in particular.

If you need to create custom parsers (i.e. embedded languages or custom file format), take a look at

Other than those, I use no external libraries at the moment, mainly because I have no need for anything else.

It's only a layoutmanager but... (1)

harkje (719359) | more than 9 years ago | (#11090656)

... recently I discovered TableLayout. Most Swing guis I code nowadays use it. Very flexible and much easier to use than GridBagLayout. []

Depends on what you intend to do (1)

MemoryDragon (544441) | more than 9 years ago | (#11090672)

It really depends on what you want to do. But generally my starting points usually are for db related stuff hibernate for many other things stuff from the jakarta project (much of the commons stuff, xerces, log4j and others) and from there usually it becomes rougher, swing you cannot do wrong with the jgoodies stuff from, Karsten Lentzsch has done an excellent work) otherwise it depends on the task and license.

Apache is your one stop shop (2, Insightful)

LadyLucky (546115) | more than 9 years ago | (#11090722)

If it comes from apache, use it. There's so much!
  • Log4j (really, reconsider using it, it's the industry standard even with the 1.4 logging stuff, that should tell you something)
  • Tomcat for servlets, it's great
  • Velocity for a templating engine
  • Commons for your utility junk
  • Ant for building stuff
I would also recomment as another poster has Doug Lea's concurrency utilities. If you have *anywhere* written an Object.wait() or a Object.notify[all](), then replace it with these libraries.

Junit is indespensible and these days with the IDEs indistinguishable from the core java libraries themselves.

Don't write SQL, use hibernate.

For security, you cant go past the legion of the bouncy castle (I'm serious)

Use cruise control to set up a continuous build

And the *only* piece of closed source code we rely on is Clover coverage. It's simply fantastic. You'll love it if you adopt unit testing as your quality mechanism.

Re:ANT... (1)

j3110 (193209) | more than 9 years ago | (#11094630)

I agree whole heartedly on everything you say. (Except maybe absolutly saying to use hibernate instead of SQL... I've run into sld situation where I wouldn't recommend it.)

Anyhow... I'm going to be starting a job soon where Maven is the build tool instead of ANT. I've been using ANT for years. Does /. have any wisdom on Maven? As I understand it, it seems to be an "enterprise" version of ant, where the projects are fractured and co-dependant.

Does anyone know of any good references... I wasn't able to find a book, and the website is slightly lacking.


Re:ANT... (0)

Anonymous Coward | more than 9 years ago | (#11095111)

I haven't used Maven, but I respect this guy:

Howard Lewis Ship [] of Tapestry fame. Also behind HiveMind.

Re:ANT... (1)

LadyLucky (546115) | more than 9 years ago | (#11097141)

Honestly, I think maven is atrocious.

The Bile Blog [] has plenty to say about it.

I think Maven may work if you don't mind drinking a bit of kool aid and structuring your project around your build tool, rather than the other way round.

Jamon (replacement for JSP) (1)

iroberts (672505) | more than 9 years ago | (#11090806)

If you want to do text templating, but are turned off by JSP, you might want to take a look at Jamon [] . Jamon templates can received typed parameters, support template inheritance, and a wealth of other features. It's very much inspired from perl's Mason.

Fastutil (2, Interesting)

BoxedFlame (231097) | more than 9 years ago | (#11090955)

fastutil [] is what Jakarta Commons Collection should've been: an actually competent implementation of truly type safe containers.

MG4J [] from the same place is pretty interesting too.

xmlenc (XML output library) (1)

znerd (83191) | more than 9 years ago | (#11091266)

Don't forget xmlenc [] , an XML output library.

It's simple, fast and the memory footprint is negligible. It does not have the overhead of DOM-based solutions.

jdbc, snmp, (2, Informative)

speculatrix (678524) | more than 9 years ago | (#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: evy/snmp/s nmp_package.html

crypto - Re:jdbc, snmp, (2, Informative)

speculatrix (678524) | more than 9 years ago | (#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:

Prevayler and HttpUnit (1)

dubl-u (51156) | more than 9 years ago | (#11091652)

Many of my favorites have already been mentioned: junit, jdom, xstream, log4j, and many things from Jakarta Commons.

The other things I use regularly are HttpUnit [] , a virtual web client and Prevayler [] , a simple Java persistence framework.

OpenMap (1)

the_ambient_one (415217) | more than 9 years ago | (#11091795) [] Is a great package if you need to do any kind of map display.

XOM! (2, Informative)

CraigoFL (201165) | more than 9 years ago | (#11091866)

XOM [] 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 [] and Java [] 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 [] for a good read.


ANTLR for writing lexers and parsers (1)

barrkel (806779) | more than 9 years ago | (#11091933)

If you whip up domain-specific languages (DSLs) often, ANTLR is an excellent tool for writing lexers and parsers and tree parsers.

(Tree parsers parse the syntax tree generated by the parser (optional) for doing multi-pass semantic / compile checks, for example.)

Once you've learned the techniques for DSLs you start to use them everywhere, especially in large architectural design).

JNT (1)

4of12 (97621) | more than 9 years ago | (#11093385)

Might look around at NIST [] .

A few years ago I saw a nice presentation from one of the NIST people about getting the best Java performance for scientific computational tasks.

And those too: (1)

AnotherJavaPenguin (840657) | more than 9 years ago | (#11096069)

Some usefull stuff that I actually *use* besides all the great tools mentioned above (in no particular order):

here's some (0)

Anonymous Coward | more than 9 years ago | (#11096178)

XStream - xml - to - java and back activemq - jms server xpp3 - xml pull parser 3 eclipse - ide

JDOM? I prefer dom4j! (0)

Anonymous Coward | more than 9 years ago | (#11102710)

I'm surprised no one has mentioned yet. JDOM has a place: for the simplest of needs it is good, but dom4j is like a swiss army knife for XML. Check it out.

I also echo the sentiments about using HttpClient, but I find that it needs jTidy to go with it (to turn messy, unbalanced HTML into XML that can be sliced and diced with dom4j's xpath expressions).
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?