First answer by 202.84.223.165. Last edit by Subash. Contributor trust: 28 [recommend contributor]. Question popularity: 166 [recommend question]
So, Simple JVM means Java Virtual Machine and JRE means Java Run Time Enviornment.
The Java Virtual Machine provides a platform-independent way of executing code, by abstracting the differences between operating systems and CPU architectures. Java Runtime 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.
jvm is a java virtual machine. jre means java runtime environment.
jvm having the jre and extra s/w and h/w components.
jvm is the hear of the javaprogram at the time of compilation, which converts the sorce code to the byte code,which is redable form of machine language. java is a platform independent. The bytecode is vary from one platform to another platform(for ex: linux to unix or win).jre is interpreter of the bytecode to machine dependent code.jre is an interpreter of the java program.
I have this much knowledge gained. that‘s why i give this answer.
jre=jvm+some classes(like awt,swing...)
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 runtime environment also so jre is given for redistribution to the clients to whoom u make a s/w product...
Hello, The previous answer is correct. Just wanna add some info more.
jre= targeted for execution i.e. 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.
____JDK____........................____JRE____
|compiler-+---> byte-code -------->|..libs...|
|..+...........|..........|......................|...+.....|
|.libs.........|.(local machine).........|..JVM....|
|..+...........|...........|.................___________
|.JVM <---+------------.................| machine/ |
|.............|.............................| processor|
___________........................____________
|machine/ |
|processor|
____________
now you will see JVM is shipped in both JDK and JRE. because while you are developing(writing code) you need to execute it on JVM that is why it is in JDK.
Tt is also in JRE because when your sell your software to client (who donot develop java code) but he needs JVM to interpret it on her machine/processor architecture...
Note: For different processor architectures JRE is different. Thus JDK can contain more than one JVM/JRE(libs+jvm).
libs: java libraries (shared one also)
~sky
Java Virtual Machine is to run Java Java Runtime Enviroment is a tool to creat Java Programs
or viseversa ??????kind of tired dont rember!
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.
JVM : Java Virtual Machine
U need a JVM installed on your machine in order to write and execute Java programs. Its a basic environment for Java programs.
JRE : Java Runtime Environment
If u just want to run applets or servlets (Java programs that run on internet) i.e. Online Yahoo games or puzzles, JRE needs to be installed on the machine.
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.