Oracle's Server JRE Contains JDK?
Asked Answered
H

1

12

I've just downloaded Oracle's Server JRE for Java SE 7 (link) The file I downloaded was server-jre-7u45-linux-x64.tar.gz. When I extracted this file I was surprised to find a directory named jdk1.7.0_45 was created containing the full java JDK. Not what I expected from a JRE install. What is going on here?

Hydrobomb answered 11/1, 2014 at 1:21 Comment(3)
Hmm, does it include javac?Declarant
I double checked, and so you do! Wow. What version of Linux are you running? You might be able to get a repacked version of that for your distribution.Pinnatiped
@ElliottFrisch Strange, right? It's SLES 11 SP3.Hydrobomb
P
25

The answer is in the description of the packages on the parent page:

JDK: (Java Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.

Server JRE: (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.

JRE: (Java Runtime Environment). Covers most end-users needs. Contains everything required to run Java applications on your system.

In the Server JRE case, "tools commonly required for server applications" includes some of the JDK tools. For instance, a web container (like Tomcat) needs to turn JSPs into compiled Java servlets, and this requires a callable Java compiler.

IMO, the benefit of using Server JRE is in what it DOES NOT include; i.e. the Java plugin which is a security nightmare (!) and auto-update which is bad for production service stability.

Phenacaine answered 11/1, 2014 at 2:30 Comment(3)
One of the more confusing aspects of this that may be better served as a new question on stack overflow is the binaries that are duplicated in the Server JRE. I understand having the "tools commonly required for server applications" in a different directory "bin" than the main JRE binaries "jre/bin". I don't understand duplicating binaries like "java" and "keytool" in both directories. Anyone know why they do that as opposed to just not doing it or at least symlinking them? Are they functionally different in any way? Their md5sums would indicate "no".Sheasheaf
You would need to ask "them". However, it is possible that symlinks might break (poorly written) scripts; e.g. in 3rd-party applications that depend on a JRE. I don't think they are functionally different.Phenacaine
They now have a great blog post with a FAQ that covers some of these topics. I'm just not sure how to mix it into this answer without copying the whole post. blogs.oracle.com/java-platform-group/…Affiliate

© 2022 - 2024 — McMap. All rights reserved.