Bhavin Sheth typed:

> any Java programs to run. A program say, A.java compiles without any errors 
> but when I try 'java A' then it shows an error 'Can't find file A.class' 
> But the file A.class is present when I try 'ls -l'..... The default 
> classpath is set as follows:
> CLASSPATH=/usr/lib/jdk-1.1.6/lib/classes.zip
> 
> If I manually try to set the path like:
> $set CLASSPATH=/home/Bhavin/Java

> 
> even then the same error occurs. 

The first thing is that the "set" builtin in bash doesn't do the 
equivalent function as on an MSDOS commandline. (Refer "man bash")
Use the export command instead. Also you need to preserve the original 
$CLASSPATH so that the new setting is added to the CLASSPATH instead of
replacing it.

So the correct command should be :

export CLASSPATH=/home/Bhavin/Java:$CLASSPATH

I think the UNIX versions of java automatically include the standard 
libraries like classes.zip in the classpath. (At least the blackdown 
version does it). So you might just getaway with not including the original
value (the $CLASSPATH part) in the exort command above.


> Also is JDK-1.2.xz (for linux) available ? Where can I download it from ?
> 

It (JDK1.2.2) is available on the April 2000 PCQuest CD. In case you don't 
have that CD, you could download it from http://java.sun.com. (If I 
recall right, version 1.2.3 is the most current version - though I'm 
not sure if the Linux version for it has been released)

Kala

-----------------------------------------------------------------------
LIH is all for free speech.  But it was created for a purpose - to help
people discuss issues about installing and running Linux.  If your
messages are counterproductive to this purpose, your privileges to
submit messages can and will be revoked.

Reply via email to