understand JRE & JDK ,difference between openjdk-8-jdk-headless & openjdk-8-jdk
Question:-1
-----------
what is the difference between JDK & JRE
===============================
JDK stands for java development kit
it provides environment
to write java code
to compile java code
to execute java code
JDK -YOU CAN WRITE CODE
YOU CAN COMPILE CODE
YOU CAN EXUECTE CODE
JRE
---
JRE stands for Java Run Environment
it provides execution environment for java application
JRE -YOU CAN ONLY EXECUTE CODE (TESTING)
or YOU CAN RUN JAVA CODE (TESTING)
QA/STAGING/PROD SERVERS:->We recommend JRE only
because we run the code only
DEV SERVERS:------------>We recommend JDK only
developer write code
compile code
execute code
also
We recommend JDK
but sometimes we also install JDK in QA/STAGING servers also
to install necessary DEBUG tools which requires JDK
Why we install JDK on QA/Staging Servers
========================================
because JDK includes some of the diagnostic and monitoring tools
sometimes bug appears only the STAGING environment but not in our local machine
in this time these tools will help us..
so, in this context we install JDK also
Question:-2
-----------
in amazon Linux /redhat Linux servers how to list out a particular package versions?
============================================================
yum whatprovides python
yum whatprovides java
======================
it list out all the versions of java
EX:OUTPUT
JAVA 1.8
JAVA 1.11
1.17
1.21
1.25
Question:-3
-----------
in ubuntu servers how to list out a particular package versions
============================================
apt list "python3-*"
apt list "openjdk-*"
====================
it list out all the versions of java
openjdk-8-jdk-headless
openjdk-8-jre-headless
openjdk-8-jdk
openjdk-8-jre
openjdk-11-jdk-headless
openjdk-11-jdk
openjdk-17-jdk-headless
openjdk-17-jdk
openjdk-21-jdk-headless
openjdk-21-jdk
openjdk-21-jre
openjdk-25-jdk-headless
openjdk-25-jdk
openjdk-25-jre-headless
PART-1
======
openjdk-17-jdk-headless ---code -compile - execution -DEV
openjdk-17-jre-headless ---only for execution ---->QA/STAGING/PROD
apt install openjdk-17-jdk-headless
apt install openjdk-17-jre-headless
PART-2
======
openjdk-17-jdk
openjdk-17-jre
Question:-4
-----------
what is the difference between openjdk-8-jdk & openjdk-8-jdk-headless
=====================================================================
generally java software is created for GUI & CLI purpose
but in our case we are using Linux servers /ubuntu server
1.openjdk-8-jdk-headless --->fast install (less files) -less time
it avoids or removes GUI libraires or files from the installation
we get only CLI
so that it is easy to install jdk fastly in our machine
it is recommended to install
2.openjdk-8-jdk------------->slow install---(more files) -more time
it installs GUI + CLI completely
but in our case we are using Linux /ubuntu which is CLI OR CUI
it is not recommended to install
Question:-5
-----------
is python available default in ubuntu ?
Yes, Python is available by default on almost every modern version of Ubuntu.
Question:-6
-----------
is git available default in ubuntu ?
Yes, git is available by default on almost every modern version of Ubuntu.
-----------
what is the difference between JDK & JRE
===============================
JDK stands for java development kit
it provides environment
to write java code
to compile java code
to execute java code
JDK -YOU CAN WRITE CODE
YOU CAN COMPILE CODE
YOU CAN EXUECTE CODE
JRE
---
JRE stands for Java Run Environment
it provides execution environment for java application
JRE -YOU CAN ONLY EXECUTE CODE (TESTING)
or YOU CAN RUN JAVA CODE (TESTING)
QA/STAGING/PROD SERVERS:->We recommend JRE only
because we run the code only
DEV SERVERS:------------>We recommend JDK only
developer write code
compile code
execute code
also
We recommend JDK
but sometimes we also install JDK in QA/STAGING servers also
to install necessary DEBUG tools which requires JDK
Why we install JDK on QA/Staging Servers
========================================
because JDK includes some of the diagnostic and monitoring tools
sometimes bug appears only the STAGING environment but not in our local machine
in this time these tools will help us..
so, in this context we install JDK also
Question:-2
-----------
in amazon Linux /redhat Linux servers how to list out a particular package versions?
============================================================
yum whatprovides python
yum whatprovides java
======================
it list out all the versions of java
EX:OUTPUT
JAVA 1.8
JAVA 1.11
1.17
1.21
1.25
Question:-3
-----------
in ubuntu servers how to list out a particular package versions
============================================
apt list "python3-*"
apt list "openjdk-*"
====================
it list out all the versions of java
openjdk-8-jdk-headless
openjdk-8-jre-headless
openjdk-8-jdk
openjdk-8-jre
openjdk-11-jdk-headless
openjdk-11-jdk
openjdk-17-jdk-headless
openjdk-17-jdk
openjdk-21-jdk-headless
openjdk-21-jdk
openjdk-21-jre
openjdk-25-jdk-headless
openjdk-25-jdk
openjdk-25-jre-headless
PART-1
======
openjdk-17-jdk-headless ---code -compile - execution -DEV
openjdk-17-jre-headless ---only for execution ---->QA/STAGING/PROD
apt install openjdk-17-jdk-headless
apt install openjdk-17-jre-headless
PART-2
======
openjdk-17-jdk
openjdk-17-jre
Question:-4
-----------
what is the difference between openjdk-8-jdk & openjdk-8-jdk-headless
=====================================================================
generally java software is created for GUI & CLI purpose
but in our case we are using Linux servers /ubuntu server
1.openjdk-8-jdk-headless --->fast install (less files) -less time
it avoids or removes GUI libraires or files from the installation
we get only CLI
so that it is easy to install jdk fastly in our machine
it is recommended to install
2.openjdk-8-jdk------------->slow install---(more files) -more time
it installs GUI + CLI completely
but in our case we are using Linux /ubuntu which is CLI OR CUI
it is not recommended to install
Question:-5
-----------
is python available default in ubuntu ?
Yes, Python is available by default on almost every modern version of Ubuntu.
Question:-6
-----------
is git available default in ubuntu ?
Yes, git is available by default on almost every modern version of Ubuntu.
Comments
Post a Comment