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. Java网络编程(URL&URLConnection)

    package cn.itcast.net.p2.ie_server; import java.io.IOException; import java.io.InputStream; import j ...

  2. Android实例-程序界面内截取屏幕(XE8+小米2)

    结果: 1.只能截取程序界面内的图片. 2.图片有点不清楚,自己设置清楚度. 实例代码: unit Unit1; interface uses System.SysUtils, System.Type ...

  3. JS 实现地区,省份,城市,县区4级联动

    刚学JS,实战一下,做一个省份信息4级联动. 但是网上查了都是3级的,没有4级,现在做一个的是带地区的4级联动,最简单的办法是修改别人的代码,最开始找到的事类似于下边这个的: 省市县关联菜单 < ...

  4. jquery基础篇

    1.jquery选择器和css选择器的关系: jquery的选择器是源于css,jquery支持css1和css2的全部和css3 的部分选择器,同时它也有少量独有的选择器. 2.常用jquery选择 ...

  5. git 几款好用的客户端工具

    虽然git命令非常好用,但客户端UI工具掌握起来.使用起来更加容易.如果你不想用git命令的话,那就用UI工具代替吧. 下面介绍下几款好用的git工具 1.tortoiseGit for Mac (这 ...

  6. Codeforces Round #320 (Div. 1) [Bayan Thanks-Round] C. Weakness and Poorness 三分 dp

    C. Weakness and Poorness Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/5 ...

  7. Java算法实例集合(2)

    这是Standford一位计算机老师的私藏,里面包含了不少Java/C++的算法实现代码.有兴趣的朋友可以看看.

  8. Linux下文件描述符

    http://blog.csdn.net/kumu_linux/article/details/7877770 文件描述符是一个简单的整数,用以标明每一个被进程所打开的文件和socket.第一个打开的 ...

  9. [021]转 C++ Pimpl机制

    出处:http://www.cnblogs.com/gnuhpc/ 1.简介 这个机制是Private Implementation的缩写,我们常常听到诸如“不要改动你的公有接口”这样的建议,所以我们 ...

  10. [013]函数重载--int*和void*的匹配优先级

    同事去面试的时候的问题: 测试一下发现:在同时存在int*和void*的重载函数时,vs2010的环境下,优先匹配void* #include<iostream> using namesp ...