Samir Kureshi wrote:try like this....
No, that won't help at all. That sets a CLASSPATH to a value which is unnecessary and will lose you access to your local files. It is also specific you your computer, and appears to have some errors, eg missing out .s.
You should never set a permanent CLASSPATH if you can possibly help it. You should use the -cp flags on the "java" and "javac" tools, or put it in the manifest file. For the java and javac tools, look here, then look at the links on the right.
then append the following to the bottom of the file:
export JAVA_HOME=/<path to jdk>
this worked perfectly for me after I downloaded and compiled jdk binaries from sun website. Hope it helps you too.
posted 11 years ago
Welcome to JavaRanch
There is a better way to install Java on a Debian-based Linux installation, which includes Ubuntu: Jesper Young told us here to use sudo apt-get install sun-java6-jdk which sets the PATH automatically. There is a similar instruction to update it.
An rpm-based Linux installation (eg Suse, Fedora) can use a similar instruction with the rpm tool.
The instructions to use export PATH in the .bashrc file should work for any "bash" terminal; Ubuntu and OpenSUSE and Fedora usually use "bash". You can probably find out which terminal you are using by giving a nonsense instruction to the terminal
campbell@linux-747u:~> which bash
bash: oeirhglkcjxnvgiud: command not found
And the name of the shell program appears as part of the error message
roses are red, violets are blue. Some poems rhyme and some are a tiny ad: