hi himal!
i dont know about the first question. you can browse the sun site for that.
as far as the second question is concerned,
mostly in Linux default shell is Bash. in bash shell u can set any environment variable as follows,
bash#VARNAME=<<value of parameter>>; export VARNAME
here it is two step process,
1. assignment to variable,
2. exporting the var to make it visible to other applications as well.
e.g. if u have installed
java in directory java in the Root directory then u can set classpath as,
bash#CLASSPATH=/java/lib/tools.jar:/java/lib/dt.jar:
and export it using
bash#export CLASSPATH
hope this works for u. also u might want to add the "current dir" to the CLASSPATH so u dont get ClassNotFoundException when u run a java code from the same directory where u have the class files as well. u can update the CLASSPATH as,
CLASSPATH=$CLASSPATH:.
to do this.
NOTE: OBSERVE that there MUST BE no spaces around '=' sign while setting the classpath variable. else it won't work.
let me know if u still find problems with it...
hth,
regards
maulin