When you install a JDK, the JRE should already be included.
Don’t do anything more, and it’s unknown if you do anything whether you might damage your JDK/JRE.
In other words, just point your alternatives to your JDK and your apps that require the JRE will “just work.”
I don’t seem to be able to create an entry in http://susepaste.org/; I get this message when I press the [create] button:
[openSUSE Paste](https://susepaste.org/) > Error [Login](https://susepaste.org/user/login)
**404 Page Not Found**
The page you requested was not found.
N.B. If I try to login to http://susepaste.org/ it asks for an “OpenID”, whatever that is.
Oh, yes; reviewing the SDB article, I see that I overlooked that in the introductory information.
So (just to be sure I understand how this works) the update-alternatives settings for the JDK will carry over to the JRE as well? My system still retains the Java 10 that came with the original installation, for use by other more up-to-date tools.
I am concerned as to whether JRE 8 will work properly with the update-alternatives system because of what I see in its configuration:
@14:24:27,root@pinto
~
█ update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib64/jvm/jre-10-openjdk/bin/java 2005 auto mode
[b]* 1 /usr/java/latest/bin/java 1 manual mode[/b]
2 /usr/lib64/jvm/jre-10-openjdk/bin/java 2005 manual mode
Press <enter> to keep the current choice
[li], or type selection number:[/li]@14:24:44,root@pinto
~
█ update-alternatives --config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib64/jvm/java-10-openjdk/bin/javac 2005 auto mode
* 1 /usr/java/jdk1.8.0_221-amd64/bin/javac 3 manual mode
2 /usr/lib64/jvm/java-10-openjdk/bin/javac 2005 manual mode
Press <enter> to keep the current choice
[li], or type selection number:[/li]
The Java Runtime** E**nvironment (JRE) is only what is necessary to provide what is needed to run a Java application.
The Java Development Kit (JDK) is a collection of development tools, but how can you use those tools without being able to run the Java application you’re building? - So, the JRE has to be included in the JDK.
If you have the JDK 10 (oracle or openjdk), you should see an alternatives entry, so can switch between any you wish.
Typically, apps will run in at least the next more recent version without a problem.
Also, you should know that no matter what documentation says, apps should be able to run in the Oracle or openjdk versions of Java (JRE) with no difference, and although at one time there was only one significant compiler difference I notice that today several tools might be evolving at a different paces (JDK).
Note that the “openjdk” package is actually the JRE, and “openjdk-devel” is the JDK.