Manual Non-RPM Method
This is the 'generic' variant that also works with GNU/Linux clones that do not support RPM. It does not require administrator rights and allows to install multiple java versions on the same computer.
-
1Download the JDK from Sun[1].
Professional Linux Laptop
Linux on M6400, E6500, E6400, E4200 Fedora, Ubuntu, RHEL, Debian, Slack
www.EmperorLinux.com -
2Click on the "Download" link in the JDK 6 section.
-
3Accept the license and continue.
-
4Under the "Linux Platform", select "self-extracting file".
-
5Download this .bin file and save it to your GNU/Linux machine.
-
6Once it has been downloaded, switch to the directory where you saved the file. You do not need to be a root and only must have the write access to the folder where you wish to install java. If your administrator is not supportive, you may need to place java into your home folder or even better on some shared network location.
-
7Type sh name_of_the_downloaded_file, for instance sh jdk-6u2-linux-i586.bin. There is no need to make this file executable.
-
8The license agreement should start appear on the screen. Scroll to the end of it with 'Enter' and type yes.
-
9This installer will create its installation in the same folder, where the downloaded file was placed and from where you have started the installation script. But the installed java jre is rather independent and can be easily moved into another place just by copying all its files.
-
10You can install multiple different jre's this way: they coexist together and can be used if some software requires the older version to run.
-
11The java executable you need to launch is located in a subfolder, called 'bin'. This way of installation will not configure a default 'java' command for you: you must do this manually or always include the full path in your startup script.
Manual RPM Method
This seems a 'more civilized' way to install java: it allows the installer to check the dependencies on some system libraries that may be missing. However it does not support versioning easily and may fail even in some systems that do support RPMs. The current java installations are rather self-dependent and the required minimal requirements are usually satisfied anyway.
-
1Download the JDK from Sun[2].
-
2Click on the "Download" link in the JDK 6 section.
-
3Accept the license and continue.
-
4Under the "Linux Platform", select "RPM in self-extracting file".
-
5Download this .bin file and save it to your GNU/Linux machine.
-
6Once it has been downloaded, login as root and switch to the directory where you saved the file.
-
7Execute './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.
-
8You 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.
-
9This will place an .rpm file in the same directory as your .bin file with the same name (minus the .bin part).
-
10Install 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).
-
11Now, if you want to be able to execute this version of Java interpretor or compiler from any directory on your GNU/Linux system you will have to create a few symbolic links:
- ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
- ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac
- ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
-
12You are done!
Ubuntu Method Using a GUI Package Manager
-
1Open a package manager (probably either Synaptic or Adept Manager)
-
2Perform a search for sun-java6.
-
3Select sun-java6-bin and sun-java6-jre for installation. If you want to use Java as a plug-in in your browser, then also select to install sun-java6-plugin. Depending on the package manager, you may be asked if you wish to install the required dependencies or it will automatically select them without confirmation.
-
4Click the button to apply the changes. Depending on the package manager, a pop-up window may appear asking for you to confirm the changes.
-
5Wait while it downloads and installs. Partway through the process, a window will appear asking you to accept Sun's license for using Java; read and accept the license.
-
6Java should now be installed and ready to use!
Ubuntu Method Using a Console
-
1Enter one of the following into your console program: sudo apt-get install sun-java6-bin sun-java6-jre if you don't want the browser plug-in or sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-plugin if you do need the plug-in. It automatically takes care of the dependencies and lists the changes for confirmation.
-
2Enter y to confirm the install.
-
3Accept the license that pops up after a short while.
-
4Java is now ready!
- http://www.wikihow.com/Install-Java-on-Linux
| How to Set File Permissions Using `chmod'< Prev | Next >How to clear a print queue |
|---|


