JDK (Java Development Kit)

Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools includecompiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…

Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.

You need JDK, if at all you want to write your own programs, and to compile the m. For running java programs, JRE is sufficient.

JRE is targeted for execution of Java files

i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.

JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file

JRE (Java Runtime Environment)

Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system

The Java Virtual Machine provides a platform-independent way of executing code; programmers can concentrate on writing software, without having to be concerned with how or where it will run.

If u just want to run applets (ex: Online Yahoo games or puzzles), JRE needs to be installed on the machine.

JVM (Java Virtual Machine)

As we all aware when we compile a Java file, output is not an 'exe' but it's a '.class' file. '.class' file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent.

The JVM is called "virtual" because it provides a machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a cornerstone of the write-once run-anywhere value of Java programs.

There are different JVM implementations are there. These may differ in things like performance, reliability, speed, etc. These implementations will differ in those areas where Java specification doesn’t mention how to implement the features, like how the garbage collection process works is JVM dependent, Java spec doesn’t define any specific way to do this.

Classpath

Classpath is nothing but setting up the environment for Java. Java will use to find compiled classes (i.e. .class files).

Path

PATH is nothing but setting up an environment for operating system. Operating System will look in this PATH for executables.

Java的基础概念的更多相关文章

  1. Java多线程--基础概念

    Java多线程--基础概念 必须知道的几个概念 同步和异步 同步方法一旦开始,调用者必须等到方法调用返回后,才能执行后续行为:而异步方法调用,一旦开始,方法调用就立即返回,调用者不用等待就可以继续执行 ...

  2. Java并发基础概念

    Java并发基础概念 线程和进程 线程和进程都能实现并发,在java编程领域,线程是实现并发的主要方式 每个进程都有独立的运行环境,内存空间.进程的通信需要通过,pipline或者socket 线程共 ...

  3. JAVA一些基础概念

    Java (计算机编程语言) Java是一门面向对象编程语言,不仅吸收了C++语言的各种长处,还摒弃了C++里难以理解的多继承.指针等概念.因此Java语言具有功能强大和简单易用两个特征. Java语 ...

  4. Java面试基础概念总结

    面向对象软件开发的优点有哪些? 答:开发模块化,更易维护和修改:代码之间可以复用:增强代码的可靠性.灵活性和可理解性. 多态的定义? 答:多态是编程语言给不同的底层数据类型做相同的接口展示的一种能力. ...

  5. Java注解基础概念总结

    注解的概念 注解(Annotation),也叫元数据(Metadata),是Java5的新特性,JDK5引入了Metadata很容易的就能够调用Annotations.注解与类.接口.枚举在同一个层次 ...

  6. Mina入门:Java NIO基础概念

    JDK1.4引入了Java NIO API(Java New IO),Java NIO得到了广泛应用.NIO允许程序进行非阻塞IO操作.java.nio.* 包括以下NIO基本结构: Buffer - ...

  7. RabbitMQ消息队列入门篇(环境配置+Java实例+基础概念)

    一.消息队列使用场景或者其好处 消息队列一般是在项目中,将一些无需即时返回且耗时的操作提取出来,进行了异步处理,而这种异步处理的方式大大的节省了服务器的请求响应时间,从而提高了系统的吞吐量. 在项目启 ...

  8. java SE 基础概念梳理(一)

     (一)First 摘要:Java概述.Java开发环境搭建.程序开发流程 Java概述  Java的应用 开发QQ.迅雷程序(桌面应用软件)开发淘宝.京东(互联网应用软件) Java的擅长 互联网: ...

  9. [18/11/7] Java的基础概念

    java语言的优势是跨平台 ,计算机界的英语,是IT行业的第一大语言 特点是多线程 分布式 健壮性 面向对象 java和JavaScript的关系 雷锋和雷峰塔的关系 或卡巴斯基和巴基斯坦的关系有个基 ...

随机推荐

  1. Spring Data JAP 多个不是必填的查询条件处理

    简单的介绍一下使用场景,DAO层用Spring Data实现,dao 只有接口,实现类是容器启动时动态字节码生成,接口里定义方法,方法上@Query 里写JPQL查询语句. 基于以上的限制,如果对一个 ...

  2. JBOss 端口没占用!

    打开exlipse ,启动服务器 后,报如下错误:

  3. asp.net webservice 跨域解决方法

    首先需要把[System.Web.Script.Services.ScriptService]前边的注释去掉,放开权限,其次需要在web.config 里<system.web节点下>添加 ...

  4. 让asp.net web api同时支持[AcceptVerbs("GET","POST")]

    在使用第三方接口时,有时候会看到接口同时支持GET和POST,当时想想webapi有AcceptVerbs特性,没有细想便想当然肯定会支持,后来项目中需要用到,当时在没有参数传入下确实支持,直到早几天 ...

  5. 剑指OFFER之第一个只出现一次的字符(九度OJ1283)

    题目描述: 在一个字符串(1<=字符串长度<=10000,全部由大写字母组成)中找到第一个只出现一次的字符. 输入: 输入有多组数据每一组输入一个字符串. 输出: 输出第一个只出现一次的字 ...

  6. lunix机器的jdk安装

    本来不想写这篇博客的,写在这儿只是作为自己的笔记,jdk安装了千万编,但是踩过的坑老是不记,看别人的博客又各种不爽,所有索性自己写一个得了.老规矩,无图. Oracle版本的jdk下载地址:http: ...

  7. Redis的Time Event与File Event的微妙关系

    redis里设计了两类事件,一类是file event,一类是time event. 其中file event主要为网络事件而设计,而time event为一些后台事件设计. 在两类事件的管理设计上, ...

  8. [置顶] 用Wireshark保存RTP的负载码流

    这段时间工作太忙,有些日子没写文章了,今天准备了一篇Wireshark工具的一个小功能,在验证码流的时候非常好用,闲话不说,直接说步骤: 1.打开Wireshark抓取流媒体码流,然后用RTP过滤: ...

  9. 【翻译】Ext JS最新技巧——2014-5-12

    原文:mkt_tok=3RkMMJWWfF9wsRoluazJZKXonjHpfsX77OQlXK%2B%2FlMI%2F0ER3fOvrPUfGjI4AT8NjI%2BSLDwEYGJlv6SgFS ...

  10. redis实现spring-redis-data的入门实例

    redis的客户端实现.主要分为spring-redis-data .jredis. 记录下spring-redis-data的学习心得:spring-redis-data 中我目前主要用了它的存.取 ...