Basic concepts of Java and basic concepts of Java

Source: Internet
Author: User

Basic concepts of Java and basic concepts of Java
JDK (Java Development Kit)

Java Developer Kit contains tools needed to develop the Java programs, andJRETo 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 opensJRE, Loads the class, and invokes its main method.

You needJDK, 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.

JDKIs 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

TheJava Virtual MachineProvides 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 ),JRENeeds to be installed on the machine.

 

JVM (Java Virtual Machine)

As we all aware when we compileJava file, Output is not an 'exe 'but it's a'. class 'file.'. class' file consistsJava byte codesWhich 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.

TheJVMIs 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.