[Biojava-l] Problem Running program on command line

abhi232 at cc.gatech.edu abhi232 at cc.gatech.edu
Wed Sep 26 17:24:34 UTC 2007

Hello all,
I am trying a simple command line program in which i take a abi file as
input and then print the sequence out.

This is my source code:
import java.io.File;
import java.io.IOException;
import org.biojava.bio.program.abi.ABITrace;
import org.biojava.bio.seq.*;
import org.biojava.bio.Annotation;
import org.biojava.bio.seq.SequenceTools;
import org.biojava.bio.seq.DNATools;
 * Command.java


public class Command {

    /** Creates a new instance of Command */
    public Command() {

    public static void main(String args[])
        String arg;
        int len = args.length;
        arg = args[0];
        System.out.println("The input argument path is:"+arg);
        //String path = "C:/applicationfolder/";
        File ft = new File(arg);

                System.out.println("File object created successfully");

        try {
            ABITrace trace = new ABITrace(ft);
            Sequence new_seq =
            String sequence = new_seq.seqString();
            System.out.println("The sequence is:"+sequence);

        } catch (IOException ex) {


I have set the classpath with all the jar files the biojava library
has.But I am getting the following error.

Exception in thread "main" org.biojava.bio.BioError: Unable to initialize
   at org.biojava.bio.seq.DNATools.<clinit>() (Unknown Source)
   at java.lang.Class.initializeClass() (/usr/lib64/libgcj.so.5.0.0)
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
   at org.biojava.bio.program.abi.ABITrace.getSequence() (Unknown Source)
   at Command.main(java.lang.String[]) (Unknown Source)
Caused by: java.lang.IncompatibleClassChangeError: field
org.biojava.bio.seq.io.CharacterTokenization.CHARACTER was not found.
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
   at org.biojava.bio.seq.io.CharacterTokenization.getTokenType() (Unknown
(Unknown Source)
java.lang.String) (Unknown Source)
   at org.biojava.bio.seq.DNATools.<clinit>() (Unknown Source)

Can somebody please guide me on this?
Thanks in advance.

> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l

More information about the Biojava-l mailing list