[Biojava-dev] RE: [Biojava-l] install Biojava
Richard HOLLAND
hollandr at gis.a-star.edu.sg
Tue Nov 22 23:59:35 EST 2005
This is a general Java problem, not a BioJava one. There is no such concept of "installing" a Java library, just the process of adding it to your classpath whenever you need it.
However... It sounds like you are logging out of your shell between each execution, hence it works for your first javac that is run in the same shell as the export command but not when you start another shell and run javac again without doing the export first. The classpath is only valid within your current shell session. If you want it to persist across all shell sessions, you have to add it to your user profile that is run when you start a shell, or to the system profile that is run for everyone when they start a shell. Or, write a wrapper script for javac that sets the classpath each time before calling the real javac.
cheers,
Richard
Richard Holland
Bioinformatics Specialist
GIS extension 8199
---------------------------------------------
This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you.
---------------------------------------------
> -----Original Message-----
> From: biojava-l-bounces at portal.open-bio.org
> [mailto:biojava-l-bounces at portal.open-bio.org] On Behalf Of
> Te-yuan Chyou
> Sent: Wednesday, November 23, 2005 12:38 PM
> To: biojava-dev at biojava.org
> Cc: biojava-l at biojava.org
> Subject: [Biojava-l] install Biojava
>
>
> Hi:
>
> I'm trying to install Biojava onto MacOS following informations in the
> "Getting Started" section of the Biojava website, by putting
> the following
> jar files:
>
> biojava.jar
> commons-cli.jar
> commons-collections-2.1.jar
> commons-dbcp-1.1.jar
> commons-pool-1.1.jar
> bytecode-0.92.jar
>
> into the directory
>
> Macintosh HD/System/Library/Java/Extensions
>
> Then, while trying to compile the demo code "TestEmbl.java" I get 15
> errors and looks like the computer cannot find the packages
> in Biojava.
>
> At that time I didn't set the CLASSPATH because the website
> says "It is
> also possible to "install" JAR files onto your system by
> copying them...".
>
> Then I put all the jar files in the directory:
> /Users/davidchyou/Desktop/david/
> Then set the CLASSPATH by typing:
>
> export
> CLASSPATH=/Users/davidchyou/Desktop/david/biojava.jar:/Users/d
> avidchyou/Desktop/commons-cli.jar:/Users/davidchyou/Desktop/da
> vid/commons-collections-2.1.jar:/Users/davidchyou/Desktop/davi
> d/commons-dbcp-1.1.jar:/Users/davidchyou/Desktop/david/commons
> -pool-1.1.jar:
>
> in a single line, and the command works. BUT after that when
> I compile the
> demos again, the computer still produces the same set of
> error messages
> (package not exist).
>
> Could anyone tell me what else I missed out? A step-by-step
> istallation
> guide may be helpful also.
>
> Thanks
>
> Te-yuan (David) Chyou
>
> I attached the error messages I get below:
>
> ou003153:~ davidchyou$ javac
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:5: package
> org.biojava.bio
> does not exist
> import org.biojava.bio.*;
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:6: package
> org.biojava.bio.symbol does not exist
> import org.biojava.bio.symbol.*;
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:7: package
> org.biojava.bio.seq does not exist
> import org.biojava.bio.seq.*;
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:8: package
> org.biojava.bio.seq.io does not exist
> import org.biojava.bio.seq.io.*;
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:18: cannot
> resolve symbol
> symbol : class SequenceFormat
> location: class seq.TestEmbl
> SequenceFormat eFormat = new EmblLikeFormat();
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:18: cannot
> resolve symbol
> symbol : class EmblLikeFormat
> location: class seq.TestEmbl
> SequenceFormat eFormat = new EmblLikeFormat();
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:21: cannot
> resolve symbol
> symbol : class SequenceBuilderFactory
> location: class seq.TestEmbl
> SequenceBuilderFactory sFact = new
> EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY);
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:21: package
> EmblProcessor
> does not exist
> SequenceBuilderFactory sFact = new
> EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY);
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:21: cannot
> resolve symbol
> symbol : variable SimpleSequenceBuilder
> location: class seq.TestEmbl
> SequenceBuilderFactory sFact = new
> EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY);
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:22: cannot
> resolve symbol
> symbol : class Alphabet
> location: class seq.TestEmbl
> Alphabet alpha = DNATools.getDNA();
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:22: cannot
> resolve symbol
> symbol : variable DNATools
> location: class seq.TestEmbl
> Alphabet alpha = DNATools.getDNA();
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:23: cannot
> resolve symbol
> symbol : class SymbolTokenization
> location: class seq.TestEmbl
> SymbolTokenization rParser = alpha.getTokenization("token");
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:24: cannot
> resolve symbol
> symbol : class SequenceIterator
> location: class seq.TestEmbl
> SequenceIterator seqI =
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:25: cannot
> resolve symbol
> symbol : class StreamReader
> location: class seq.TestEmbl
> new StreamReader(eReader, eFormat, rParser, sFact);
> ^
> Desktop/Biojava-1.4.1/demos/seq/TestEmbl.java:28: cannot
> resolve symbol
> symbol : class Sequence
> location: class seq.TestEmbl
> Sequence seq = seqI.nextSequence();
> ^
> 15 errors
> ou003153:~ davidchyou$
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>
More information about the biojava-dev
mailing list