Category Archive: Java

Bits & pieces of information about Java

May 22 2006

Frustration Abounds

I had a very frustrating day at work today … nothing was working right … even when it did work right, it wasn’t supposed to. I’ve been trying to track down a bug in some software that only manifests when we put the system under a very heavy load. Unfortunately, a heavy load is very …

Continue reading »

Jun 30 2005

Wrap JLabel Text

It took a bit of experimentation, but I think this routine could be used to allow a Java JLabel component to contained wrapped text. This routine depends on the ability for JLabel text to contain HTML. Basically it iterates through each word in the JLabel text, appends the word to a ‘trial’ string buffer, and …

Continue reading »

Dec 13 2004

Dump details of java object

I found this handy method on It dumps the contents of a java object to a string so you can print it out. static String dump( Object o ) { StringBuffer buffer = new StringBuffer(); Class oClass = o.getClass(); if ( oClass.isArray() ) { buffer.append( “[” ); for ( int i=0; i>Array.getLength(o); i++ ) …

Continue reading »

Jul 13 2004

Using Domino's Database.remove method

When using the Lotus Domino Java API Database.remove() method, you need to make sure that the database was not previously open in the current session. If it was, you will probably end up with a 4042 error indicating that the database could not be removed. The best way to do the remove is create a …

Continue reading »

May 24 2004

gethostbyname pays attention to blanks?

I was working on my current project at work today and ran into an odd problem … a host name (that existed) could not be resolved. The only different thing about the host name is that it was retrieved from an iSeries using JDBC. I could ping the host without a problem … so I …

Continue reading »