[Biojava-l] Intsall Problems Update

David Huen smh1008 at cus.cam.ac.uk
Sat Feb 28 07:50:25 EST 2004


On Friday 27 Feb 2004 9:36 pm, Orion Hunter wrote:
> So, I added
>
> /home/user/biojava/main to my classpath, since org.biojava.* sits in this
> directory (maybe this should be mentioned in the getting started page). 
> I got rid of all my compile errors, but am encountering runtime errors
> now:
>
> /home/user/biojava/demos>$ java seq.TestEmbl seq/AL121903.embl
> java.lang.NoClassDefFoundError:
> org/biojava/bio/symbol/SimpleCrossProductAlphabet
>         at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:54)
> rethrown as org.biojava.bio.BioError: Unable to initialize DNATools
>         at org.biojava.bio.seq.DNATools.<clinit>(DNATools.java:85)
>         at seq.TestEmbl.main(TestEmbl.java:22)
>
> If I go into the directory of this package, there is no .class file for
> this file (which is of course why I got this error).  HOwever, I cannot
> figure out why there is no .class file.  I didn't get any compile errors,
> but I would have thought this class file would have been compiled then.
> ANy suggestions?
>
>
> From: "Orion Hunter" <orion2480 at hotmail.com>
>
> >To: biojava-l at biojava.org
> >Subject: RE: [Biojava-l] Intsall Problems
> >Date: Fri, 27 Feb 2004 21:11:47 +0000
> >
> >In case it makes a difference, I forgot to mention that I am using
> >j2sdk1.5.0beta on an Intel based RedHat  9.1 machine.
> >
> >Matt
> >
> >p.s. Sorry for the "intsall" mispell
> >
> >>From: "Orion Hunter" <orion2480 at hotmail.com>
> >>To: biojava-l at biojava.org
> >>Subject: [Biojava-l] Intsall Problems
> >>Date: Fri, 27 Feb 2004 20:39:21 +0000
> >>
> >>I am trying to install biojava.  I d/l biojava1.3.1, unziped and
> >> untarred it.  I installed ANT, but I am confused.  It specifies to
> >> execute ANT from the "biojava-live" directory, but I cannot find this
> >> directory, nor any build.xml files anywhere.
> >>
> >>So, then I try to download the jar file.  I download all three required
> >>files (biojava.jar, bytecode.jar, and xerces.jar).  I add them to my
> >>classpath (and have confirmed that the classpath is correct and is
> >>remembered by the machine in my env).
> >>
> >>So, with a set of jars, I decided to try out the demo.  Following the
> >>instructions on the website (in the "getting started" section), I cd to
> >>the demos/, and type the following:
> >>
> >>/home/user/biojava/>javac seq/TestEmbl.java
> >>
> >>I get a whole slew of errors, of which all look like they have to do
> >> with the fact that it can't find the packages in org.biojava.bio, etc.
> >>  Now, I can see this package structure in
> >>
> >>/home/user/biojava/main/org/biojava/bio, etc.
> >>
> >>And I was trying to execute from /home/user/biojava/demos
> >>
> >>So, why can't it find the packages?  I'm not new to java, but it's been
> >> a long time since I've had to deal with packages, and I can't recall
> >> how to make biojava see where the packages are located.  Any
> >> suggestions?
> >>

OK, I will go thru' the steps necessary to do a compile and installing the 
jars that result from the compile.

1) install ant
You mentioned you have done this.  Do ensure that the ant bin/ directory is 
in PATH so typing "ant" will execute ant.

2) compile the BJ source tree.
cd <wherever the the biojava-live directory is>
ant

3) setting up the CLASSPATH
Java relies on the CLASSPATH to find classes it needs.  You have to set the 
CLASSPATH to include the jars that biojava depends on as well as the jar in 
which biojava resides.

running ant creates the biojava.jar in the biojava-live/ant-build directory.  
If you wish to use that jar, you must put it into your CLASSPATH.  I 
usually set up my CLASSPATH in .bash_profile at login.

If you are just d/ling the precompiled biojava-1.3.jar, you still need to 
put it into your CLASSPATH or java will nto find the classes it wants and 
give you the error messages your are reading.

At this stage, things should just work.

Regards,
David Huen



More information about the Biojava-l mailing list