Although perl is the obvious best option. If you are venturing into java (note the lowercase j). I did some successful coding in Jython. You see, you can grab the jython jar, rename it to zip, and inject/copy all the (either Oracle or DB2) jdbc files into the zip, then rename it back. What you then have is a slightly overweight jython jar, which, without any fuzz, can connect to a database, and runs on Linux/AIX/Windows/Breadtoaster if you have the right java installed. It might work with Sybase too.
Now if you excuse me, I need to do penance for suggesting something else than perl....