Hi there!
I've some tips:
1 - Do not install anything at your home directory. Choose a more appropriated place as
/usr/local or
/usr/local/share or
/opt/. Doing that, Java SDK would be available to every user on your machine, otherwise you will need to install java again for every other user, thus wasting resources.
2 - Java SDK installation instructions is very well documented at Sun's homepage. If you follow it step by step, you will get it to work:
http://java.sun.com/j2se/1.5.0/install-linux.html
3 - Exporting your PATH would work (it's similar to Windows Environment Variables), it's done by adding these lines to your
/etc/profile or
~/.bashrc
PATH="$PATH:/usr/local/java/j2sdk<version>/bin"
export PATH
Note: the above line is an example. Use your Java SDK directory instead.
4 -
java and
javac are both located at the folder where JSDK was decompressed. I believe yours should be something like
/usr/local/java/jdk1.5.0/bin/
You could simply create a link for java and javac to your /usr/bin (I do that, instead of using PATH variables). eg:
ln -s /usr/local/java/jdk1.5.0/bin/java /usr/bin/java
ln -s /usr/local/java/jdk1.5.0/bin/javac /usr/bin/javac
Many would not recommend this method, because a few important tools such as jar and appletviewer are left out (unless you link them too). You can test Java anytime now by typing "java -version" at the terminal.
Good luck!