[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: NoClassDefFound error & [LIH] sun jdk on RH6.2

Well, I wasn't in office for sometime....now that I'm back, here goes
*From jdk1.2*, u don't need to set the classpath at all!!!!! (If u use the
bootstrap classes and the extensions provided by jdk only).   Check these
links out as to how classes are found.


And yes, the classes in the current directory  are also "seen" by the java
interpreter since "." is the default CLASSPATH setting (i.e if no CLASSPATH
env variable is found).  If u need to define the CLASSPATH environment
variable, (for classes developed by u/3rd party) then you will have to
specify  "." in the classpath,  as you overrode the default "." ...seems
fair enough doesn't it.  The links should give u more info.


Rajeev Jha <rajeevj@xxxxxxxxxxxxxx> on 07/13/2000 10:35:59 AM

Please respond to linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx

To:   linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
cc:    (bcc: Ravikiran G Thirumalai/India/IBM)
Subject:  Re: [LIP] NoClassDefFound error

putting . in classpath solves the problem , but why do we need the
current directory in classpath ? it should first look in the current
directory only , is n't it ?

tgravik@xxxxxxxxxx wrote:
> You probably donot have "." the current directory in ur classpath.
> the same and try running "java" on the class file


          Re: [LIH] sun jdk on RH6.2
          Tue, 18 Jul 2000 09:57:46 +0530
          Rajeev Jha <rajeevj@xxxxxxxxxxxxxx>

hi list
the problem was of not having a . in classpath. but java and javac path
were set and i was trying to execute the byte-codes from current
directory only. on earlier machine classpath didn't have a . and it was
working fine, when i executed programs from the same directory. on this
machine also,search should start from the current directory , so why u
have to include it explicitly in the classpath ?