Java中的一些基础总结

2018-03-12  本文已影响179人  骑着乌龟去看海

概述

  本文主要介绍学习Java中遇到的一些比较基础的概念性的东西及一些搞不太清楚的名词解释。以前没有仔细了解过,现在回过头来进行总结下。

一、JDK版本了解

一般情况下,我们下载的JDK版本名称为:jdk-8u101-windows-x64,我们来简单解释下:

  1. 8指的是JDK的版本是8.0版本,u指的是update,101代表更新的次数。一般更新的次数为单数的时候,通常只包含补丁文件或一些小的漏洞修复;双数的时候通常包含新功能或新优化之类。
  2. 详细的可参考R神的回复:[讨论] JDK的版本编号的具体含义
    具体的版本历史可参考维基百科:维基百科-Java历史版本
二、JDK、JRE、JVM区别
  1. JRE : Java Runtime Environment, Java 运行环境,JRE由JVM,Java运行时类库,动态链接库等组成;
  2. JDK : Java Development ToolKit,Java开发工具包(包含了编译器,调试器,javadoc等),用于开发和运行Java程序;
  3. JVM : Java Virtual Machine, Java 虚拟机,负责将编译产生的字节码转换为特定的机器代码行;

Public JRE is a Standalone JRE. Any java application running on your system can use this JRE. It can be uninstalled seperately from JDK.
Private JRE is installed inside JDK folder (C:\Program Files (x86)\Java\jdk1.7.0_25\jre). It is used by the tools like javac etc.
引用地址:http://javaconceptoftheday.com/jdk-installation/

Private Versus Public JRE
Installing the JDK also installs a private JRE and optionally a public copy. The private JRE is required to run the tools included with the JDK. It has no registry settings and is contained entirely in a jre directory (typically at C:\Program Files\jdk1.7.0\jre) whose location is known only to the JDK. On the other hand, the public JRE can be used by other Java applications, is contained outside the JDK (typically at C:\Program Files\Java\jre1.7.0), is registered with the Windows registry (at HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft), can be removed using Add/Remove Programs, might be registered with browsers, and might have the java.exe file copied to the Windows system directory (which would make it the default system Java platform).
引用地址:Oracle - Private Versus Public JRE

参考资料:
JDK基础概念及目录结构
Windows的JDK与JRE,java.exe在哪里是谁干了什么
你執行的是哪個 JRE?

上一篇下一篇

猜你喜欢

热点阅读