Why does the install for 13.1 -or- 13.2 insist on installing openJDK 1.7 -and/or- openJDK 1.8 … even though I already have Oracle 1.7 installed??? It is messing up my Android Compiles.
What flag is there that will state that I already have a Java installed that should take care of things??
There is no openJDK 1.8 for openSUSE 13.1, at least not in the standard repos.
-or- 13.2 insist on installing openJDK 1.7 -and/or- openJDK 1.8 … even though I already have Oracle 1.7 installed??? It is messing up my Android Compiles.
You can install several versions of openJDK at the same time, they are independent of each other, and 1.8 is no update for 1.7. Probably “java” is recommended/required by some other package/pattern you have installed but that is not provided by Oracle’s rpm. Or something recommends openJDK 1.8 explicitely.
You can choose which one the system should use via “update-alternatives”. If you set 1.7 there, 1.8 should not mess up your Android Compiles even if installed.
For how to set Oracle’s java as default via “update-alternatives”, see here: https://en.opensuse.org/SDB:Installing_Java#Making_Oracle_Java_default
You might have to run the “update-alternatives” lines mentioned in the installation section first though if you haven’t done so already. I think Oracle’s java does not support “update-alternatives” by itself.
What flag is there that will state that I already have a Java installed that should take care of things??
The usual lot:
“Ignore recommended packages for already installed packages” (“Options” menu in YaST)
“solver.onlyRequires” in /etc/zypp/zypp.conf
“taboo” the package in YaST, or add a lock with “zypper al java-1_8_0-openjdk” e.g.
On 2014-11-16 16:36, chucktr wrote:
>
> Why does the install for 13.1 -or- 13.2 insist on installing openJDK 1.7
> -and/or- openJDK 1.8 … even though I already have Oracle 1.7
> installed??? It is messing up my Android Compiles.
>
> What flag is there that will state that I already have a Java installed
> that should take care of things??
I assume you mean “java-1_7_0-openjdk” (OpenJDK, IcedTea), when you have
already “jre” from Oracle Corporation.
Well, the only official java, as far as the distribution is concerned,
is icedtea and another one I don’t remember. The oracle java does not exist.
So yes, you need to install one of the official java rpms, like icedtea,
and then also install the one from Oracle. And use
“update-alternatives” to tell the system which one is the default one,
and it will be happy.
The problem is that the Oracle rpm does not have the requires “provides”
fields. Years ago, openSUSE was allowed to redistribute the oracle jave,
and the fields were amended. But Oracle changed the license, the
adequate fields are missing, and the rpm is not recognized as providing
“java”. At least, that’s how I see it
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
Thanks to you both for your replies. I would presume from your answers that it would be best IF I install all the items that are going to demand an openJDK … and then install the Oracle version that I want and make it the default. Otherwise, IF I install the Oracle first, it will get placed on the “back burner” … via the other installs.
On 2014-11-17 02:26, chucktr wrote:
>
> Carlos and wolfi323,
>
> Thanks to you both for your replies. I would presume from your
> answers that it would be best IF I install all the items that are going
> to demand an openJDK … and then install the Oracle version that I want
> and make it the default. Otherwise, IF I install the Oracle first, it
> will get placed on the “back burner” … via the other installs.
>
> Is my assumption correct??
No, the ordering is irrelevant.
You have to install both, no matter in which order. One, because the
system demands a java it recognizes as such, or it will remove
everything related to java in the entire system because “there is no java”.
The other because it is the one you want.
In fact, during system install, you can only install the system one, as
none other is available at that point. But you can install none, install
after system install the jre, then install the system one, then all the
other packages, like libre office.
As I said, ordering is irrelevant. But maybe inconvenient.
No matter what order of install you use, then you use the
“update-alternatives” script to choose the default java.
The order of install doesn’t select the default one.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
Thanks for the clarification… This Java stuff is really crazy. To many versions. My only reason for involvement with it is cause of my “Smartphone”. I have never programmed in Java before. Almost always in ‘C’. Your last clarification message really made sense … and to the point. IF you don’t mind I am going to copy it… or a variation… over to my Web Pages… The Java install section(s). Plural cause I talk about it in the Smartphone section and the openSuSE section. I record everything … even the failures. My pages get scrambled sometimes -but- the info is there. Just use “my Google” on the first page to find stuff. MyPages
On 2014-11-18 13:26, chucktr wrote:
>
> Carlos,
>
> Thanks for the clarification… This Java stuff is really crazy.
There is a post here somewhere with instructions on how to install the
jre or sdk, or whatever the correct name is. And a script for doing it.
I don’t have the link handy, but it should be findable - if not, I’ll
search my notes.
You probably need the development kit, and that is installed somewhat
differently from standard java “users use”.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)