. WIKIMERIONET
Merion Mertics , ,

-
-
CRM

5

, Java , . Java JDK (Java Development Kit) - , Java-. JDK - , JRE (Java Runtime Environment - Java), Java ( Loader for Java), Javac (), Jar () .

Oracle Java 11 CentOS 8 RHEL 8.

 Oracle Java 11  OpenJDK 11  CentOS 8  RHEL 8

JDK JRE, OpenJDK Oracle Java

, Java, Java Development Kit Java Runtime Environment. JDK - Java, JRE - Java. JRE JDK.

Java 11:

  • Oracle Java SE Development Kit 11 (JDK 11)
  • OpenJDK 11

Oracle Java , . OpenJDK, - Java . OpenJDK Oracle JDK


OpenJDK 11

:

sudo yum install java-11-openjdk-devel

:

java -version

:

openjdk 11-ea 2018-09-25
OpenJDK Runtime Environment (build 11-ea+28)
OpenJDK 64-Bit Server VM (build 11-ea+28, mixed mode, sharing)

c which:

which java

:

/usr/bin/java

! Java!

LTS, OpenJDK 8, :

sudo yum install java-1.8.0-openjdk-devel

OpenJRE

Java, - Java, JDK Java (JRE). JRE Java (JVM) , . Java-. , LTS - JRE 8 JRE 11.

: - OpenJRE, OpenJDK. Java Development Kit .

JRE 11, :

sudo yum install java-11-openjdk

JRE 8, :

sudo yum install java-1.8.0-openjdk

OpenJDK Headless

OpenJRE, Java Headless OpenJDK .

Headless - , , . .

OpenJDK 11 Headless, :

sudo yum  java-11-openjdk-headless

OpenJDK 8 Headless:

sudo yum  java-1.8.0-openjdk-headless

Oracle Java SE Development Kit 11 (JDK 11)

Oracle JDK . .rpm Java SE.

Java SE (Standard Edition) , . Java SE Java Enterprise Edition (Java EE), .

, Java SE , . LTS - Java 11.

Java SE 11.0.5 (LTS) Oracle JDK (Java Development Kit). , Oracle JRE (Java Runtime Environment) .

:

sudo yum install /home/user/Downloads/jdk-11.0.5-linux-x64.rpm

user . , , .

-version

java -version 
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

Java

alternatives, Java .

alternatives --config java

Java, Java, .

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-1.el8_0.x86_64/jre/bin/java)
   2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.2.7-2.el8.x86_64/bin/java)
*+ 3           /usr/java/jdk-12.0.2/bin/java

Enter to keep the current selection[+], or type selection number: 2

, Java . .


JAVA_HOME

Java , JAVA .

/etc/profile.d.

vi /etc/profile.d/java.sh

Java ( alternatives):

export PATH=$PATH:/usr/lib/jvm/java-11-openjdk-11.0.2.7-2.el8.x86_64/bin/
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.2.7-2.el8.x86_64/
export J2SDKDIR=/usr/lib/jvm/java-11-openjdk-11.0.2.7-2.el8.x86_64/

:

source /etc/profile.d/java.sh

, ~/.bash_profile.

. , Java .


?


: