BioJava:GetStarted
From BioJava
Contents |
Introduction
BioJava will run on any computer with a Java virtual machine complying to the Java 2 Standard Edition (J2SE) 1.4 (or later) specifications. Java implementations for Linux, Windows, and Solaris are available to download from Sun's java website. Recent versions of MacOS X include a suitable Java implementation as standard. Java is also available on many other platforms: if in doubt, contact your vendor. BioJava binaries are distributed in .jar (Java ARchive) format.
You can get the latest version BioJava 1.6 (requires Java 1.5+) from the download area .
You can get the legacy version of BioJava 1.5 (requires Java 1.4+) ; or
You can get the legacy release version of BioJava 1.4 here;
You can also integrate BioJava with NetBeans IDE. To find out how follow this link.
Installation
None of these .jar files need to be unpacked for normal use -- simply place them in a convenient directory.
To use BioJava, add the required JAR files to your CLASSPATH environment variable. The exact syntax varies between platforms. The text is wrapped due to limited space. The actual commands should be on a single line:
UNIX Bourne-type shells (the default with most Linux distributions and MacOS 10.3)
export CLASSPATH=/home/thomas/biojava-live.jar:/home/thomas/bytecode.jar:
/home/thomas/commons-cli.jar:
/home/thomas/commons-collections-2.1.jar:
/home/thomas/commons-dbcp-1.1.jar:
/home/thomas/commons-pool-1.1.jar:.
In some distributions of Biojava, you need to specify biojava.jar instead of biojava-live.jar in the above. We are working on resolving this.
UNIX C-type shell (for example: versions of Mac OS X pre-10.3)
setenv CLASSPATH /home/thomas/biojava-live.jar:/home/thomas/bytecode.jar:
/home/thomas/commons-cli.jar:
/home/thomas/commons-collections-2.1.jar:
/home/thomas/commons-dbcp-1.1.jar:
/home/thomas/commons-pool-1.1.jar:.
In some distributions of Biojava, you need to specify biojava.jar instead of biojava-live.jar in the above. We are working on resolving this.
Windows from command line
set CLASSPATH C:\biojava-live.jar;C:\bytecode.jar;C:\commons-cli.jar;
C:\commons-collections-2.1.jar;C:\commons-dbcp-1.1.jar;
C:\commons-dbcp-1.1.jar;.
In some distributions of Biojava, you need to specify biojava.jar instead of biojava-live.jar in the above. We are working on resolving this.
Windows autoexec.bat files
set CLASSPATH=C:\biojava-live.jar;C:\bytecode.jar;C:\commons-cli.jar;
C:\commons-collections-2.1.jar;C:\commons-dbcp-1.1.jar;
C:\commons-pool-1.1.jar;.
In some distributions of Biojava, you need to specify biojava.jar instead of biojava-live.jar in the above. We are working on resolving this.
It is also possible to "install" JAR files onto your system by copying them into your Java installation's extensions directory. On most Unix systems, this is named ${JAVA_HOME}/jre/lib/ext. On Mac OS X there is a per-user extensions directory called ~/Library/Java/Extensions (you may have to create this directory yourself). For other platforms, consult your Java vendor.
You can now compile and run BioJava programs using the javac and java commands. You might like to look at the tutorial, API documentation and the BioJava in anger section . Finally, you can learn a lot about BioJava by trying the demo programs included in the source distribution (see below).
Building your own
If you want to modify BioJava, you can obtain a copy of the source code from the Source directory of the download area. Source releases are distributed in .tar.gz format. You can also obtain up-to-the-minute source code via an anonymous SVN checkout.
BioJava is built using the ant build tool, a Java-specific equivalent of the common Make utilities. Please download and install the latest version of ant (currently 1.6.1). It is available here.
To build the library, just change into the biojava-live directory and type ant. The final JAR file will be placed in the ant-build directory. You can also use the command ant javadocs-biojava to build the API documentation.
Building the demo programs
The source distribution contains a number of small demo programs. Once you have a working biojava.jar on your classpath, these can be compiled directly using javac from the demos directory.
(unix) cd demos javac seq/TestEmbl.java java seq.TestEmbl seq/AL121903.embl (windows) cd demos javac seq\TestEmbl.java java seq.TestEmbl seq\AL121903.embl

