Page 1 of 1

Replacing openjdk with oracle jdk

PostPosted: May 27th, '12, 05:03
by kujirasan
I am trying to replace openjdk with oracle jdk, I ahve downloaded and installed the oracle one, but some how it does seem to be replacing the openjdk and the icedtea, any help on this?

Re: Replacing openjdk with oracle jdk

PostPosted: May 27th, '12, 05:59
by yankee495
I to am working on this. I downloaded the JRE from http://java.com/en/download/manual.jsp?locale=en.

It installs to /usr/java/ Java version # is listed here.

Chrome and Firefox are using /usr/lib/jvm OpenJDK version # here.

I'm looking for where to configure the default java.

That is a start. I think you should close and re-open your browser to test here:


http://www.java.com/en/download/installed.jsp

It should tell you that you have the latest once you get it working.

I'm interested in this so I can always be up to date.

Re: Replacing openjdk with oracle jdk

PostPosted: May 27th, '12, 09:45
by yankee495
Well, I've been looking around. I have a little Lunix experience, with Mandriva, Mandrake and way back Redhat. I found a tool (system-switch-java - A tool for changing the default Java toolset​) that you can install but it only switches OpenJDK.

I have not found how to switch to the Sun/Oracle version though I do know where it is installed.

Re: Replacing openjdk with oracle jdk

PostPosted: May 27th, '12, 10:03
by isadora
Used following command as root myself to switch between:

Code: Select all
update-alternatives --config java

Re: Replacing openjdk with oracle jdk

PostPosted: May 28th, '12, 00:39
by doktor5000
isadora wrote:
Code: Select all
update-alternatives --config java

This can only be used to switch if the installed packages supports the alternatives mechanism, i.e. when using the Mageia packages.
Otherwise you want to adjust the PATH environment variable to the folder where your java now resides, or editing /etc/java/java.conf

Re: Replacing openjdk with oracle jdk

PostPosted: May 28th, '12, 03:02
by yankee495
This works: http://www.if-not-true-then-false.com/2 ... -hat-rhel/

It also provides a way to switch back. I made a simple script to change from icedtea to Oracle.

It is really a 5 minute job and you get to learn something.

Re: Replacing openjdk with oracle jdk

PostPosted: May 28th, '12, 14:23
by doktor5000
Well, it's essetially how the manual implementation of the alternatives mechanism works, so you kinda did the distro integration yourself. :)
BTW: Thanks for sharing that information.

Re: Replacing openjdk with oracle jdk

PostPosted: May 28th, '12, 14:49
by yankee495
doktor5000 wrote:Well, it's essetially how the manual implementation of the alternatives mechanism works, so you kinda did the distro integration yourself. :)
BTW: Thanks for sharing that information.


You're welcome. I like control. And this gives it to you. I didn't want to be stuck on Oracle or openjdk.

So far I'm lovin' this Mageia. It ain't perfect, but non is and I have faith they'll get it going really smooth.

What gets me with all distros is the way they move stuff. A common path (for Java, Flash, all that stuff) on all distros would be nice, yeah, right.

Good example: Mandriva 2011. No 3D Desktop in MCC. I was on the phone with a friend and said "you're looking at it". He said nope...not there. Well, I googled and got him to a konsole to run it.

I understand some computers had problems, but hey, mine ran great. Don't remove (hide) the tool. Let people see if it works for them.

Re: Replacing openjdk with oracle jdk

PostPosted: May 28th, '12, 19:04
by doktor5000
yankee495 wrote:What gets me with all distros is the way they move stuff. A common path (for Java, Flash, all that stuff) on all distros would be nice, yeah, right.

Well, you're totally right, this is the price to pay for so much choices of distros and software and stuff. I'd also like to see more unification, but as linux is built up in a modular way, and one can exchange any module with multiple others, who do the same function, more or less.

Somebody wise said sometime ago: The price of freedom is eternal vigilance.
For linux and open source you could exchange that by: The price of freedom and choice is eternal fiddling. :twisted:

Re: Replacing openjdk with oracle jdk

PostPosted: May 30th, '12, 04:59
by kujirasan
Thank you for your replies, the command update-alternatives --config java, is only useful if java(jdk-jre) is already installed and a choice can be made, The second choice proposed by Yankee, is bit daunting, but will try it, and will inform you,
the other problem is the presence of icedtea, which nothing but a nuisance and that one has to be replaced as well, and linked with Firefox.
There is a software called parted magic, once it loads with one click it installs the latest java and update Firefox to the current version, wonder why no one uses the procedure in that software.
Once again thanks immensely for your replies, really appreciated it!

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 11:43
by gouessej
kujirasan wrote:the other problem is the presence of icedtea, which nothing but a nuisance and that one has to be replaced as well, and linked with Firefox.

I remind you that OpenJDK, Icedtea and Icedtea-web are free open source projects, these are not what I would call "nuisance". I'm really sad to read such things here, on the forum of a free open source operating system. I'm disappointed by this waste of energy to switch back to Oracle JVM whereas some people here could have reported bugs. If you prefer non free softwares, go back to Windows, stay in your golden jail.

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 12:46
by isadora
Please tone down a bit.

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 13:00
by gouessej
isadora wrote:Please tone down a bit.

Would you like anyone to use the term "nuisance" to designate Mageia?

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 13:06
by isadora
This is not what i said: my only purpose is, not to have the discussion run out of it's original intend.

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 13:10
by gouessej
isadora wrote:This is not what i said: my only purpose is, not to have the discussion run out of it's original intend.

Ok, I'm sorry but Icedtea is a part of the open sourcing effort of Java started in 2006, I felt very angry when I read his comment.

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 10th, '12, 13:37
by isadora
No problem, i very well understand. ;)

Re: Replacing openjdk with oracle jdk

PostPosted: Jul 14th, '12, 08:18
by MauRice