Sham,
sorry about mistyping.
i_user$cd $JAVA_HOME
i_user$$JAVA_HOME/bin/java --version
like that.
I mean in order to run your j2sdk in your bash,
every time you can open your shell, and do the commands,
e.g)
ex_user$/usr/j2se/bin/java -version or
ex_user$/usr/j2se/bin/javac example.java
But, you can export JAVA_HOME environment variable in your bash shell.
ex_user$export JAVA_HOME=/usr/j2se
ex_user$echo $JAVA_HOME
=> /usr/j2se
ex_user$export PATH=$JAVA_HOME/bin AND
ex_user$javac example.java
or
ex_user$$JAVA_HOME/bin/javac example.java
(means you haven't exported your PATH variable)
=> you can compile at this current shell, but later, you need to export the path when you login again or open the new shell.
misc thing, when you want to unset exported env variable you made on your current shell, simply type
ex_user$unset
it will unset the current(JAVA_HOME) env variable.
you could put those in your .bashrc on your home directory.
export JAVA_HOME=/usr/j2se
export PATH=$JAVA_HOME/bin:/sbin/:/usr/bin:/usr/local/bin ... etc
in order to install netbeans,eclipse,
j2ee,and lots of apache stuffs, you better specify your env variable in your .bashrc or /etc/profile to the global though you can export the env variable everytime when you open up the new shell.
or am I missing your point again?
Firstly, you might be confused with bash stuff in linux, but later, you would really enjoy how easy and flexible to use env variable or some other shell command in linux shell to deploy/develope java. I was tired of setting env variable in windows.
Another misc stuff, change the /etc/man.config
add one more line there
MANPATH=/usr/j2se <= in your case
now, you will see the man page of java in your shell
ex_user$man jdb
will show man page for jdb
if you want to update 'whatis' database for man page, simply type
ex_user$makewhatis
[ March 13, 2003: Message edited by: stephen Kang ]
[ March 13, 2003: Message edited by: stephen Kang ]