Can't run Oracle Java JRE

Issues related to applications and software problems
Post Reply
jdritchie
Posts: 13
Joined: 2014/07/10 02:41:04

Can't run Oracle Java JRE

Post by jdritchie » 2014/07/20 04:08:28

Hi, it seems that the system does not allow me to use the Oracle Java version and locks me into OpenJDK instead.

Code: Select all

===================================================================================================================================================================================================================
 Package                                     Arch                                           Version                                              Repository                                                   Size
===================================================================================================================================================================================================================
Installing:
 jre                                         x86_64                                         1.7.0_65-fcs                                         /jre-7u65-linux-x64                                          80 M

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total size: 80 M
Installed size: 80 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : jre-1.7.0_65-fcs.x86_64                                                                                                                                                                         1/1 
Unpacking JAR files...
	rt.jar...
	jsse.jar...
	charsets.jar...
	localedata.jar...
	jfxrt.jar...
  Verifying  : jre-1.7.0_65-fcs.x86_64                                                                                                                                                                         1/1 

Installed:
  jre.x86_64 0:1.7.0_65-fcs                                                                                                                                                                                        

Complete!

$ sudo alternatives --config java

There is 1 program that provides 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55-2.4.7.2.el7_0.x86_64/jre/bin/java

Enter to keep the current selection[+], or type selection number: 
How can I setup Oracle Java JRE/JDK to run as default on my Centos Desktop? I need Oracle Java to run some applications along with certain libraries that don't work too well with OpenJDK.

Thanks.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't run Oracle Java JRE

Post by TrevorH » 2014/07/20 09:35:22

You have to use alternatives --install to tell it about the other version before you can --config it
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jdritchie
Posts: 13
Joined: 2014/07/10 02:41:04

Re: Can't run Oracle Java JRE

Post by jdritchie » 2014/08/21 22:00:46

Sorry got to this a bit late, thanks for the info I will try it out.

anderson_thomas
Posts: 96
Joined: 2011/11/21 10:19:41

Re: Can't run Oracle Java JRE

Post by anderson_thomas » 2014/08/22 11:37:35

Hi jdritchie,

look here, it's for jdk 1.6.0... but change the paths, and you could do it like described here, in my DokuWiki (sorry, only in german):

http://www.dokuwiki.tachtler.net/doku.p ... iebssystem

Enjoy,

Post Reply