1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing Java on your Linux box

Discussion in 'Linux' started by pradeep, Mar 27, 2007.

  1. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Java is a fairly important technology to have on any operating system. Countless Web sites make use of Java or JavaScript; programs such as Zend Studio are Java applications that require the Java Runtime Environment; and many developers develop in Java. Unfortunately, most Linux distributions do not ship with Java due to its license fee. Certain Java implementations are free, such as GCJ, or the GNU Compiler for Java, but it isn't Sun's Java implementation, which is arguably the better of the two.

    Luckily, installing Java on your Linux system is extremely simple. Visit the Java download Web site and select the operating system you'd like to download for (Linux, Linux AMD64, Solaris, etc.). Once you've chosen the download file—either a self-extracting executable or a self-extracting RPM file—you can install it.
    Code:
     # mkdir -p /usr/local/java
     
     # cd /usr/local/java
     
     # mv /path/to/jre-1_5_0_05-linux-amd64.bin .
     
     # chmod u+x jre-1_5_0_05-linux-amd64.bin
     
     # ./jre-1_5_0_05-linux-amd64.bin
      
    The installation must be done as root if you want the Java installation to be site-wide; if you want it just for yourself, you can extract the package in ~/bin/java or some other appropriate location. In the above, the JRE is installed in /usr/local/java/jre1.5.0_05/.

    As a quick test, run the java executable:
    Code:
     # cd jre1.5.0_05/bin
     
     # ./java -version
     
     
    To make Java available to all users, add it to the default PATH settings by editing /etc/profile and adding:
    Code:
     
     PATH=$PATH:/usr/local/java/jre1.5.0_05/bin
     
     JAVA_HOME=/usr/local/java/jre1.5.0_05
     
     export $PATH $JAVA_HOME
     
     
  2. napster_hacker17

    napster_hacker17 New Member

    Joined:
    Nov 24, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
  3. jhon_lewis

    jhon_lewis New Member

    Joined:
    Mar 12, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
  4. Corwin

    Corwin New Member

    Joined:
    Mar 28, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Linux Engineer
    Location:
    Europe
    Home Page:
    Yep, this is all you need :)
     
  5. unni krishnan.r

    unni krishnan.r New Member

    Joined:
    Apr 20, 2010
    Messages:
    204
    Likes Received:
    3
    Trophy Points:
    0
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    aalso remind you java is now available int hte ubuntu software center availabe wih ubuntu
     

Share This Page