What is the difference between JDK and JRE?

前端 未结 20 1886
孤独总比滥情好
孤独总比滥情好 2020-11-22 03:31

What is the difference between JDK and JRE?

What are their roles and when should I use one or the other?

20条回答
  •  春和景丽
    2020-11-22 04:17

    From Official java website...

    JRE (Java Runtime environment):

    • It is an implementation of the Java Virtual Machine* which actually executes Java programs.
    • Java Runtime Environment is a plug-in needed for running java programs.
    • The JRE is smaller than the JDK so it needs less Disk space.
    • The JRE can be downloaded/supported freely from https://www.java.com
    • It includes the JVM , Core libraries and other additional components to run applications and applets written in Java.

    JDK (Java Development Kit)

    • It is a bundle of software that you can use to develop Java based applications.
    • Java Development Kit is needed for developing java applications.
    • The JDK needs more Disk space as it contains the JRE along with various development tools.
    • The JDK can be downloaded/supported freely from https://www.oracle.com/technetwork/java/javase/downloads/
    • It includes the JRE, set of API classes, Java compiler, Webstart and additional files needed to write Java applets and applications.

提交回复
热议问题