Some basic concepts in Java

Source: Internet
Author: User

It wasn't long before I learned Java, and some basic concepts were a bit confusing. This is an excerpt from an occasional article:

JDK (Java Development Kit)

Java developer Kit Contains tools needed to develop the Java programs, andJRETo run the programs. The tools include compiler (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 is nothing but setting up the environment for Java. Java will use to find compiled classes (I. e.. class files ).


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