jre和jdk有什么区别???

来源:互联网 发布:chrome mac看视频发热 编辑:程序博客网 时间:2024/06/11 19:46

JRE = Java 运行时环境,有了它就能运行Java程序,可以理解为java虚拟机。
JDK = Java 开发环境,除能运行Java程序外,有Java 标准API类库,可以在此基础上开发Java程序。

以下是java.sun.com上的官方解释:

SDK and JRE
Purpose
The Java 2 SDK and Java 2 Runtime environment are the two principal
 products that implement the Java 2 Platform, for developers and consumers,
respectively.
Overview
There are two principal products in the J2SETM platform family.

JavaTM Runtime Environment (JRE)
The JRE provides the libraries, Java virtual machine, and other components
necessary for you to run applets and applications written in the Java programming
language. It does not contain tools and utilities such as compilers or debuggers
for developing applets and applications.

Java 2 SDK
The Java 2 SDK is a superset of the JRE. The Java 2 SDK contains everything that's
 in the JRE, plus additional tools such as compilers and debuggers that are necessary
for developing applets and applications.
Question: Why would anyone want the JRE if the Java 2 SDK has everything in the JRE
and more?

Answer: The JRE is smaller and therefore easier to download or distribute with software
than the Java 2 SDK. Most users of Java technology are people who just want to
run applets and applications developed by others. They're not interested in
developing any applications themselves. The relatively small Java RE is made

 for such end users. They can download the Java RE themselves from the web,
or software vendors can include it in their own products. The typical end-user
doesn't need the bulkier Java 2 SDK with its development tools. 

原创粉丝点击