1. My Query & what I reseached
After I installed JDK for Linux X64 (8u181-b13), the directory of /usr/lib/jvm included the following symbolic link of jre's.
Terminal Screenshot
lrwxrwxrwx 1 root root 21 May 29 2020 jre -> /etc/alternatives/jre
lrwxrwxrwx 1 root root 27 May 12 2020 jre-1.7.0 -> /etc/alternatives/jre_1.7.0
lrwxrwxrwx 1 root root 35 May 12 2020 jre-1.7.0-openjdk -> /etc/alternatives/jre_1.7.0_openjdk
lrwxrwxrwx 1 root root 54 May 12 2020 jre-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64 -> java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64/jre
lrwxrwxrwx 1 root root 27 May 12 2020 jre-1.8.0 -> /etc/alternatives/jre_1.8.0
lrwxrwxrwx 1 root root 35 May 12 2020 jre-1.8.0-openjdk -> /etc/alternatives/jre_1.8.0_openjdk
lrwxrwxrwx 1 root root 51 May 12 2020 jre-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64 -> java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/jre
lrwxrwxrwx 1 root root 29 May 12 2020 jre-openjdk -> /etc/alternatives/jre_openjdk
My query what is the difference of these versions, and which should be specifed during installation of Tomcat8.5.55 .
jre
jre-1.7.0
jre-1.7.0-openjdk
jre-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64
jre-openjdk
As far as I searched, my understanding of each sybolic link as follows.
jre
-Is a sybolic link pointing to
/etc/alternatives/jre
-It is only including JRE and does not include JDK
-The difference I found from jre-1.7.0 and jre-1.8.0 is that this jre is including "jjs" which is a javascript library which is depreciated now
jre-1.7.0
-Is a sybolic link pointing to
/etc/alternatives/jre_1.7.0
-It is only including JRE and does not include JDK
jre-1.7.0-openjdk
-Is a sybolic link pointing to
/etc/alternatives/jre_1.7.0_openjdk
-It is only including JRE and does not include JDK, only installing the JRE part from the open JDK.
jre-openjdk
-Is a sybolic link pointing to
/etc/alternatives/jre_openjdk
-It is an open source implementation of JavaSE and this includes JDK.
2. Background of query & What I want to do
I am now trying to install Tomcat 8.5.55 in CentOS 7.I am asking this question because, when I create tomcat service file, there is a line which specifies the JAVA_HOME, and I couldn't figure out whether to give "jre" or "jre-1.7.0" or "jre-1.8.0" in this path.
Environment=JAVA_HOME=/usr/lib/jvm/jre
[Entire tomcat.service file]
# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=[Tomcat Home Directory]/temp/tomcat.pid
Environment=CATALINA_HOME=[Tomcat Home Directory]
Environment=CATALINA_BASE=[Tomcat Home Directory]
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=[Tomcat Home Directory]/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
enter image description here
question from:
https://stackoverflow.com/questions/65860318/the-difference-between-jre-jre-1-7-0-jre-1-7-0-openjdk-jre-openjdk-jre-1