[13/13] Java Foundations Certification: JDK and JRE

Prepare for your “Java Foundations” official exam by untangling the differences between JDK and JRE. Learn what java and javac are.
Java-Foundations-Lesson-13-JDK-and-JRE

In this bonus lesson, we continue with the Java Foundations Tutorial. That is the thirteenth part of this series, and if you want to see the complete list of lessons, you can do it here.

diagram-javaWe cannot start explaining the difference between JRE and JDK without also explaining JVM. JVM or Java Virtual Machine simply helps to execute programs on our devices. It provides an environment to run the programs. JVM requires libraries and files for code execution, and these files are presented in JRE. We can have different JRE versions for different platforms. They are all platform-dependent.

JRE = set of libraries + JVM

JDK or Java Development Kit is a full-featured development kit. It has all development tool that we might require for creating java programs. jdk-installJDK contains the following tools:
  1. Java Runtime Environment (JRE)
  2. Interpreter
  3. Compiler (javac)
  4. Archiver (jar)
  5. Documentation generator (javadoc)

If you want to run your program you will need to use java or javac commands. The javac command is used to compile Java programs, it takes .java file as input and produces bytecode. On the other hand, the java command is used to execute the bytecode of java. It takes byte code as input and runs it and produces the output.

In conclusion, if you want to run the java or JVM-based code, then JRE is required. But if you want to develop Java and JVM-based programs, then JDK is required. Depending on your needs you will use javac and java commands.

Lesson Topics

This video covers the following topics:

1. What is Java?

2. JDK and JRE 

3. Java and Javac

Practical Exercises

Watch the video and solve the problemsTo better understand the material, do the coding exercises and implement the knowledge you acquired. Writing code is the only way to master the skill of code.

Submit your code in the SoftUni Judge System:

Lesson Slides

Leave a Comment

Recent Posts

About SoftUni

SoftUni provides high-quality education, profession and job to people who want to learn coding.

The SoftUni Global “Learn to Code” Community supports learners with free learning resources, mentorship and community help.

Tags

Categories