Article View: borland.public.jbuilder.java.language
Article #18417Re: Question: NoClassDefError
From: Anthony Mak
Date: Sun, 28 Jun 1998 00:00
Date: Sun, 28 Jun 1998 00:00
38 lines
1685 bytes
1685 bytes
Kimmo P�ntiskoski wrote in message <35935C5F.E1953464@igd.fhg.de>... > > >Anthony Mak wrote: > >> Dear All Newsgroupers, >> >> I am using JDK1.2. >> In my autoexec.bat, I have two lines: >> path=c:\jdk\bin;%PATH% >> set classpath=c:\jdk\lib\classes.zip >> >> However if I set the classpath, and when I compile any java file I will >> get a NoClassDefError. Therefore, I removed the set classpath statement in >> my autoexec.bat. I don't know why setting the classpath cause >> NoClassDefError. Do anyone has a clue? > >The compiler is trying to find all the classes referred by your class from the >class path.Do you have other classes that you have created in the same >directory than the class you're trying to compile. If yes try to set the >classpath like this: >set classpath=.;c:\jkd..... > ^ Thank you. This was the problem. Now, I have better understanding at how classpath works and how the interpreter and compiler search for a class and package. >The extra dot means first look the classes from directory you are and then all >the other directories in the classpath. >
Technical Details
Message-ID:
<6n4hqf$rnj8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6mtl2p$mcr4@forums.borland.com> <35935C5F.E1953464@igd.fhg.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,78956695797dc239 X-Google-Attributes: gidf74b3,public From: "Anthony Mak" <z2155678@student.unsw.edu.au> Subject: Re: Question: NoClassDefError Date: 1998/06/28 Message-ID: <6n4hqf$rnj8@forums.borland.com> X-Deja-AN: 366747660 References: <6mtl2p$mcr4@forums.borland.com> <35935C5F.E1953464@igd.fhg.de> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language