星空网 > 软件开发 > Java

Java的基础概念

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的基础概念

关键词:JAVA

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

销售技巧:如何提高买家的购买欲望?:https://www.ikjzd.com/articles/111015
揭秘:亚马逊大卖的FBA和海外仓存货比例!:https://www.ikjzd.com/articles/111016
paypal测评被骗!钱还可以追回吗?:https://www.ikjzd.com/articles/111017
干货:亚马逊选品步骤详解(三):https://www.ikjzd.com/articles/111018
重磅!美国公布第15批关税排除清单,这类进口关税或大涨!:https://www.ikjzd.com/articles/111019
菜鸟网络联合俄罗斯邮政空运全球速卖通包裹:https://www.ikjzd.com/articles/111020
E-Bike品牌EMotorad获战略融资!:https://www.kjdsnews.com/a/1840707.html
Shopee订单量激增5倍多,越南成韩国美容品牌主要消费市场:https://www.kjdsnews.com/a/1840708.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流