how can i install java?
#1
How can i install java JRE-7 on CentOS 6 64Bit? also when i try to run this command: yum update java it only updates to version 1.5, but i found JRE-7 on oracle/javas home page, but i don't know how to install it. Does anyone know how i can install it on CentOS 6 64Bit? :rolleyes:
#2
Download the x64 rpm version then install it with "rpm -ivh jre-7u2-linux-x64.rpm"
#3
(01-07-2012, 06:40 AM)f8ll Wrote: Download the x64 rpm version then install it with "rpm -ivh jre-7u2-linux-x64.rpm"

After i type the install command i t preparing and after its stop, and when i type java -version its says that java ins't installed.

root@adas [~]# rpm -ivh jre-7u2-linux-x64.rpm
Preparing... ########################################### [100%]
package jre-1.7.0_02-fcs.x86_64 is intended for a x86_64 architecture
#4
The new java is installed under /usr/java/jre1.7.0_02/bin/
so to execute, use /usr/java/jre1.7.0_02/bin/java -version or remove the old java and add /usr/java/jre1.7.0_02/bin/ to your PATH or remove the old java and create a soft link in /usr/bin to /usr/java/jre1.7.0_02/bin/java (i.e. ln -s /usr/java/jre1.7.0_02/bin/java /usr/bin/java)
#5
When i try /usr/java/jre1.7.0_02/bin/java -version it says:

root@myroot [~]# /usr/java/jre1.7.0_02/bin/java -version
-bash: /usr/java/jre1.7.0_02/bin/java: No such file or directory
root@myroot [~]#

#6
Are you sure you are using 64-bit? post the output of 'uname -a'

Does /usr/java/jre1.7.0_02/ exist?
#7
(01-07-2012, 07:27 AM)f8ll Wrote: Are you sure you are using 64-bit? post the output of 'uname -a'

Does /usr/java/jre1.7.0_02/ exist?

i'm using CentOS 6 64bit and it says:

root@myname [~]# /usr/java/jre1.7.0_02/
-bash: /usr/java/jre1.7.0_02/: No such file or directory
root@myname [~]#

#8
type "cd /usr/java/ && ls -al" and post the output.

Edit: actually its probably not installed.
#9
(01-07-2012, 07:37 AM)f8ll Wrote: type "cd /usr/java/ && ls -al" and post the output.

it says:

root@myname [~]# cd /usr/java/ && ls -al
total 12
drwxr-xr-x 3 root root 4096 Jan 6 19:51 ./
drwxr-xr-x 14 root root 4096 Oct 3 12:49 ../
lrwxrwxrwx 1 root root 16 Jan 6 19:51 default -> /usr/java/latest/
drwxr-xr-x 6 root root 4096 Jan 6 19:51 jre1.7.0_01/
lrwxrwxrwx 1 root root 21 Jan 6 19:51 latest -> /usr/java/jre1.7.0_01/
#10
Oh you have an older version. Just use /usr/java/latest/bin/java


Forum Jump:


Users browsing this thread: 1 Guest(s)

Sponsors: FuzzyHosts - WeLoveServers - Ftpit - ZXPlay - BoneVM - GalaxyHostPlus - Kwicero LTD - Verelox- HostUS


BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo