Breaking News
recent

About Hiddenthings of JVM and JRE




1)The Java Virtual Machine provides a platform-independent way of executing code, by abstracting the differences between operating systems and CPU architectures. Java Run time Environments are available for a wide variety of hardware and software combinations, making Java a very portable language. Programmers can concentrate on writing software, without having to be concerned with how or where it will run.


2)   jre=jvm+some classes(like awt,swing...)+runtime libraries. 
         jdk= mainly targeted for java development i.e. compilation (javac+others) + jvm + libraries. u can find jvm in both jre and jdk. and if u wonder what is the use of providing jre...the answer is if u develop an application in java and u want to give it to the client the u also need to provide run time environment also so jre is given for redistribution to the clients to whom u make a s/w product...


3)The JVM(Java Virtual Machine) is responsible for implementing the actual execution environment for Java and also security features. The JVM is part of the JRE. The JRE (Java Runtime Environment) contains only runtime components such as the JVM and core java classes. It does not contain any development tools such as compiler, debugger, etc. Conclusion:: The Java Virtual Machine's (JVM) function is to load the appropriate classfiles for executing a Java Program, and then to execute it. The Java Runtime Environment (JRE) includes the JVM, as the JRE provides some standard libraries and the JVM which can be used to execute a Java program.

The Java Developers Kit (JDK) also includes the JVM, standard class libraries, and several other tools that a developer needs in order to create a Java program.

 Append to this......... jvM ......>machine jrE.......>Environment tells you the whole tale.

My opinion JVM is self contained operating eniviroment that behaves as if it is a separate computer... for example ,java applet run in a JVM that has no access to the host operating system.This design two advanatages

i)System independence::A java application will run the same in JVM,regardless of H/w and S/w underlying the system.

ii)Security::Because the VM has no contact with the Operating system there is little possiblity of java prog dmaging other files or applications. JVM has this JIT(just in time compiler) JIT ,a code generator that converts java Bytecode into machine language instructions.JIT runs under control of JVM. JIT is where you can include a native code too.... JVM is one who decide where to keep just formed OBJECT in heap(garbage collectible) While JRE is just a enviroment." Enviroment" if you notice!! take a windows case.... JRE is enviroment which makes it possible for java application to run with CLR(common Library runtime). No program in windows enviroment would run without complying with CLR.
Unknown

Unknown

No comments:

Post a Comment

Powered by Blogger.