Please help trying to install Java 7

Discussion in 'Bukkit Help' started by 5tinger, Feb 8, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    5tinger

    After downloading Java7 and installing it I noticed that the java version is the same before installing java7. What step am I missing. I downloaded Java7 from http://wiki.bukkit.org/CraftBukkit_CentOS_Server_Setup

    I am running CentOS 6

    Code:
    [root@localhost java]# java -version
    java version "1.6.0_22"
    OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.42.1.10.4.el6_2-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
    [root@localhost java]# rpm -i jre-7u1-linux-x64.rpm
    Unpacking JAR files...
            rt.jar...
            jsse.jar...
            charsets.jar...
            localedata.jar...
    [root@localhost java]# java -version
    java version "1.6.0_22"
    OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.42.1.10.4.el6_2-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
    [root@localhost java]#
     
  2. Offline

    tr4st

  3. Offline

    5tinger

    I tried to remove openjdk first but failed. Is it really better to use the java7 JRE over what is already installed in CentOS?

    Code:
    [root@localhost User]# rpm -e java-1.6.0_22-openjdk
    error: package java-1.6.0_22-openjdk is not installed
    [root@localhost User]# java -version
    java version "1.6.0_22"
    OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.42.1.10.4.el6_2-x86_64)
    OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
    
     
  4. Offline

    tr4st

  5. Offline

    5tinger

    I'm not sure where I went wrong, but now I cant check the java version.

    Code:
    [User@localhost ~]$ java -version
    -bash: java: command not found
    [User@localhost ~]$
    
    Code:
    [User@localhost ~]$ alternatives --config java
     
    There is 1 program that provides 'java'.
     
      Selection    Command
    -----------------------------------------------
    *+ 1          /usr/java/jre1.7.0_01
     
    Enter to keep the current selection[+], or type selection number:
    
     
  6. Offline

    tr4st

    Try this to check the Version.
    Code:
    java -Xmx4m -version
    which java
     
  7. Offline

    5tinger

    here is what I got

    Code:
    [root@localhost java]# java -version
    bash: java: command not found
    [root@localhost java]# java -Xmx4m -version
    bash: java: command not found
    [root@localhost java]# which java
    /usr/bin/which: no java in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/User/bin)
    [root@localhost java]#
    
     
  8. Offline

    tr4st

    No Java installed :D
     
  9. Offline

    5tinger

    but why this?

    Code:
    [root@localhost User]# cd /usr/java
    [root@localhost java]# dir
    default  jre1.7.0_01  jre-7u1-linux-x64.rpm  latest
    [root@localhost java]# rpm -i jre-7u1-linux-x64.rpm
            package jre-1.7.0_01-fcs.x86_64 is already installed
    [root@localhost java]# java -version
    bash: java: command not found
    
     
  10. Offline

    Jurre1996

    I Know, I'm bringing this back from the graveyard, but I had the same problem! And I couldn't find any solution. I Finaly Figured it out though.

    What your having there is JRE And your going to need JDK
     
Thread Status:
Not open for further replies.

Share This Page