JRE vs JDK
JRE is implementation of Java Virtual Machine, Which actually executes Java Programs. JDK is a bundle of software used to develop Java Applications.
Usually, when you only care about running Java programs on your browser or computer you will only install JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you will also need JDK.
To confirm the JDK
Execute the command ‘javac -version’.
$javac -version
javac 1.8.0_251
If you got the java compiler version details, then JDK is installed in your system.
To confirm the JRE
If javac command failed to get the compiler version, execute the command ‘java -version’.
$java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
If you got the java runtime environment details, then JRE is installed in your system. If this command failed, then either Java path is not set properly or Java is not installed in your system.
You may like
Why do we declare logger with static and final?
How to check the type of a variable in Java?
Set a system property in command line
How to get the capacity of ArrayList in Java?
volatile reference vs Atomic references defined in java.util.concurrent.atomic package
No comments:
Post a Comment