[Biojava-l] binary code does not work

Thomas Down td2@sanger.ac.uk
Wed, 25 Jul 2001 09:26:51 +0100


On Tue, Jul 24, 2001 at 03:49:41AM -0400, Lun Xiao wrote:
> Hi,
> I downloaded biojava-20010702 and tried to run the TutorialEx1 example. I
> got
> an error
> Exception in thread "main" java.lang.NoSuchMethodError:
> java.lang.StringBuffer:
> method append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer; not found
>         at

Okay, I think I've tracked this...

In Java release up to (and including) 1.3, StringBuffers just
had an append(Object) method.  This worked for all sorts of things,
including appending the contents of one StringBuffer to another.

JDK1.4 has a special method, append(StringBuffer) for this case.

The upshot of this is that code which does this will compile
and run on all JDKs, but binaries compiled on 1.4 won't run
on earlier JDKs.  Ugh...

Anyway, I'll remember to switch back to JDK1.3 for compiling
binary releases.  I'll try to get a new snapshot out soon.  In
the mean time, a version compiled from the corresponding source
release will work fine...

   Thomas.