[Biojava-dev] Biojava with Java 8

Terry Casstevens tmc46 at cornell.edu
Tue Jul 29 18:01:34 UTC 2014


Dear Spencer,

I would very much appreciate your help with this.  I think it will
effect your other users also.

I am the software lead of the Buckler Lab at Cornell University, and
we use the biojava library in our software.

I'm hoping to move to your latest released jars, but I don't think
this is specific to that version.
biojava3-alignment-3.0.8.jar
biojava3-phylo-3.0.8.jar
biojava3-core-3.0.8.jar

We have everything working when compiling and running our code with Java 7.

But when running with Java 8 (compiling with Java 7 or Java 8), we are
getting NoClassDefFoundError.


This will show you the problem.  Compile this with Java 7, and run it
under Java 7 and Java 8.  You will see that it works in Java 7 and not
in Java 8.

public static void main(String[] args) {
        SimpleLocation location = new SimpleLocation(1, 7);
}


I believe your problem is in
org.biojava3.core.sequence.location.template.Location.  This line is
causing the problem in Java 8.

public static final Location EMPTY =
            new SimpleLocation(Integer.MIN_VALUE, Integer.MAX_VALUE,
Strand.UNDEFINED);



Best,

Terry


More information about the biojava-dev mailing list