In this section we will learn from where we can download jdk 1.5 and how we can install it.
There are following link from where you can download and install jdk1.5 from following link .For download you just keep in mind only one think the version of your JDK should be 1.5 and OS version and its 64 byte or 32 .
You can download different updates available also. Only developers and Enterprise administrators should download these releases.
- Click the "Download JDK" hyper link.
- Follow the instructions on the Web pages to download jdk-1_5_0-windows-i586.exe to a working directory on your hard disk. This file is about 45 MB.
- Double click on the file name: jdk-1_5_0-windows-i586.exe in the working directory in the File Explorer.
- Follow the instruction on the installation window to finish the installation. Remember to specify the target directory to be: \j2sdk1.5.0.
- Open a command window to try the java command. If you are getting the following output, your installation was ok: returns with message:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
Once JDK is installed, you can try to use it to compile and execute a simple Java program:
Procedure Install Sun JDK on Microsoft Windows:
Download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website: http://java.sun.com/javase/downloads/index_jdk5.jsp. Choose "JDK 5.0" for download and then select your Windows Platform to perform the installation.
Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example: C:\Program Files\Java\jdk1.5.0_11\. To do this, open the Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet, select the Advanced Tab, and click on the Environment Variables button.
In order to run java from the command line add the jre\bin directory to your path, for example: C:\Program Files\Java\jdk1.5.0_11\jre\bin.
To install jdk is very easy .You just click next next it will automatically install for window .
Download, Move, Install and Verify the Installation
Download the file jdk-1_5_0_22-linux-amd64-rpm.bin and move it to the server with an SSH tool.
Do a copy command to move the bin file into /usr/java:sudo cp /home/rodrigo/jdk-1_5_0_22-linux-amd64-rpm.bin /usr/java/
Change permissions to the file:sudo chmod a+x jdk-1_5_0_22-linux-amd64-rpm.bin
Run the installation file by the following command:sudo ./jdk-1_5_0_22-linux-amd64-rpm.bin
Verify youíre installation by typingjava -version,You should see something like:java version ď1.5.0_22?Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)
If you donít see this or you see previous installation of java, proceed to the next section.
Change Java Environment Variables
If you had a previous installation, you will have to change the environment variables.
Open the profile file with your favorite editor. I used nano sudo nano /etc/profile
In the /user/profile file, type the following lines. JAVA_HOME=/usr/java/jdk1.5.0_22; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH*note: JAVA_HOME location might be different for you.
Update the environment variables by typing source /etc/profile
Verify youíre installation by typing java -version
For more visit this url:http://www.oracle.com/technetwork/java/javase/install-linux-141396.html#plugin