JDK and JRockit

1. JDK installation
To install in  JDK Linux (self-extracting) file (JDK)
Follow these instructions:
1.        Download JDK to any directory, alternatively Go to http://www.java.com/and click on the Download button
  1. Move it to /usr/java if you want jdk to be used system wide(for all users)
   You need to have root access to move a file to /usr directory
    If you don’t have root access just move it to a directory where you have access.
For example, for Oracle user, who doesn’t have access to root (which is the case most of the time)
Do the following mkdir -p /u01/app/java
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Then move the self extracting  jdk file shuch as jdk-6u21-linux-x64.bin to the directory.
3. Then Change the permission of the file you downloaded to be executable
as     chmod a+x jdk-6u21-linux-x64.bin

4.       Verify that you have permission to execute the file. Type:
ls –l



  1. Change to the directory in which you want to install. Type:cd <directory path name>
    For example, to install the software in the /usr/java/ directory, Type:
    cd /usr/java/
    Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory for which you have write permissions.
4.       Run the self-extracting binary Type:./ jdk-6u21-linux-x64.bin

The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
5.       Java is installed into its own directory. In this example, it is installed in the /usr/java/jre1.6.0_<version> directory. When the installation has completed, you will see the word Done.

  1. Verify that the jre1sub-directory is listed under the current directory. Type:ls


  1. Set the java home in .bash_profile for users. For Oracle user for example at /home/oracle
 ls –la
vi .bash_profile

  1. For system wide use vi  /etc/profile

No comments:

Post a Comment