[Biojava-l] java.lang.NoClassDefFoundError error

Selmar Leeuwenburgh project4.bioinformatics at erasmusmc.nl
Wed Jun 30 07:43:10 EDT 2004


thank you al for help.

finally is work as follows:

export
CLASSPATH=/usr/java/j2sdk1.4.2_04/jre/lib/ext/biojava-1.30-jdk14.jar:/usr/ja
va/j2sdk1.4.2_04/jre/lib/ext/bytecode-0.91.jar:/usr/java/j2sdk1.4.2_04/jre/l
ib/ext/jakarta-regexp.jar:/usr/java/j2sdk1.4.2_04/jre/lib/ext/xerces.jar:/us
r/bio-java/demos

java seq.TestEmbl /bio-java/demos/seq/AL121903.embl

and on windows: properties of this computer > advanced > environment
variables en dan systemvariable CLASSPATH
C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_04\jre\lib
\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sdk1.4.2
_04\jre\lib\ext\jakarta-regexp.jar;c:\bio-java\demos;

java seq.TestEmbl C:\bio-java\demos\seq\AL121903.embl zo run ik het nu

kind regards,

Selmar.

-----Original Message-----
From: Francois Pepin [mailto:fpepin at cs.mcgill.ca]
Sent: 29 June 2004 18:35
To: Selmar Leeuwenburgh
Cc: biojava-l at biojava.org
Subject: Re: [Biojava-l] java.lang.NoClassDefFoundError error


Good old classpath error would be my guess.

try:

cd bio-java\demos
c:\j2sdk1.4.2_04\bin\java -cp . seq/TestEmbl

this should give you the following error (output is from linux):

[francois at bern demos]$ java -cp . seq/TestEmbl
Exception in thread "main" java.lang.NoClassDefFoundError:
org/biojava/bio/symbol/Alphabet

This means that you don't have the biojava.jar mounted. In my case, I
can do it with:
[francois at bern demos]$ java -cp ~/cvs/bias/biojava.jar:. seq/TestEmbl
seq/AL121903.embl
>HSDJ155G6 has 191 features
[rest of normal output follows]

java classpath is a bit tricky at the beginning but you get used to it.
You can also use a IDE that takes care of everything for you.

Francois

On Sun, 2004-08-29 at 11:29, Selmar Leeuwenburgh wrote:
> Hi,
>
> I have a question. I know there are some messages of this subject in the
> list, but I can't find the right answer.
>
> Do someone know why I get java.lang.NoClassDefFoundError error? I get the
> same error on my Linux computer with mandrake.
>
>
> the command:
>
> C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl
> C:\bio-java\demos\s
> eq\AL121903.embl
> Exception in thread "main" java.lang.NoClassDefFoundError:
> c:\bio-java\demos\seq
> \TestEmbl
>
> the content of the ext directory:
>
>  Directory of C:\j2sdk1.4.2_04\jre\lib\ext
>
> 29/08/2004  16:24    <DIR>          .
> 29/08/2004  16:24    <DIR>          ..
> 29/08/2004  16:11         2,385,919 biojava-1.30-jdk14.jar
> 29/08/2004  16:24            60,044 bytecode-0.91.jar
> 22/02/2004  23:18             8,896 dnsns.jar
> 29/08/2004  16:23            29,871 jakarta-regexp.jar
> 22/02/2004  23:21            53,247 ldapsec.jar
> 22/02/2004  23:50           769,335 localedata.jar
> 29/08/2004  15:58           111,374 sunjce_provider.jar
> 29/08/2004  16:24         1,783,457 xerces.jar
>                8 File(s)      5,202,143 bytes
>                2 Dir(s)  10,133,127,168 bytes free
>
> My env variable are
>
> C:\bio-java\demos\seq>set
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> APPDATA=C:\Documents and Settings\Selmar\Application Data
>
CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_
> 04\j
>
re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd
> k1.4
> .2_04\jre\lib\ext\jakarta-regexp.jar;
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=SELMAR
> ComSpec=C:\WINDOWS\system32\cmd.exe
> HOMEDRIVE=C:
> HOMEPATH=\
> LOGONSERVER=\\SELMAR
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
> Files\Co
> mmon Files\Adaptec
> Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls
> \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0209
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SystemDrive=C:
> SystemRoot=C:\WINDOWS
> TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp
> TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp
> ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en
> USERDOMAIN=SELMAR
> USERNAME=Selmar
> USERPROFILE=C:\Documents and Settings\Selmar
> windir=C:\WINDOWS
>
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l



More information about the Biojava-l mailing list