Originally Posted by Nylex
You want to add the directory containing the executables to your PATH, with
obviously replacing "/path/to/jdk/bin" with the relevant directory. You will also want to add this line to your ~/.bashrc file. If there's already an "export PATH=..." line present, then simply add the new directory to the end (adding a ":" before it, if there's not one there already).
i got through the instructions of java installations in the internet..it says->
1. Download the JDK from Sun, to start go here: http://java.sun.com/javase/downloads/index.jsp
2. Click on the "Download" link in the JDK 6 section.
3. Accept the license and continue.
4. Under the "Linux Platform", select "RPM in self-extracting file". As of version 6, it is 57 MB.
5. Download this .bin file and save it to your Linux machine.
6. Once it has been downloaded, login as root and switch to the directory where you saved the file.
7. Execute './filename', where filename is the name of the file that you downloaded. The filename might be very similar to jdk-6-linux-i586-rpm.bin depending on what the latest version is. You may have to make the file executable by executing the 'chmod +x filename.bin' command.
8. You will get a license, press space bar a bunch of times until you are prompted to enter yes or no. Type in yes and hit enter.
9. This will place an .rpm file in the same directory as your .bin file with the same name (minus the .bin part).
10. Install the rpm file by executing 'rpm -i filename.rpm', where filename is the name of your .rpm file. (Such as jdk-6-linux-i586.rpm).
11. Now, if you want to be able to execute this version of Java interpretor or compiler from any directory on your Linux system you will have to create a few symbolic links:
12. ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
13. ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac
14. You are done!
every thing worked fine upto the 2nd last line.but after that when i tried to isuue the javac command from the terminal then it says command not found... i think something regarding the path is to be done after this...please help me..can anyone write the next commands for me...i have absolutely no idea about the commands...