I m new to Java. Just a simple question


General J2EE: I m new to Java. Just a simple question

  1. I m new to Java. Just a simple question (2 messages)

    Hi All (Experts)

       I m new to java and come from C ++ / perl background.
    Can anyone tell me what exactly is JVM, JRE and when i run a class using java comand, what m i starting. When u say a VM instance, what does that mean ??
      I know it must be a very very basic question for u guys, but please help me or giude me to some resources on this.
     -- shane
  2. Hello shane,

    JVM stands for, Java Virtual Machine, which is a java byte code interpreter.

    JRE stands for, Java Runtime Environment, which includes the JVM and core Java Runtime Libraries.

    When you execute 'java Your_Class' you are invoking the JVM - JRE, which loads / interpretes and runs your classes. Each time you invoke 'java' you are creating a new instance of the JVM to run your program. If you ran 5 programs, they all run in their own JVM.

  3. Thanks TK.
    It was great help. You really answered my question to the point.
    One more small doubt - Is it right that when i start java.exe, i basically start JRE and JRE includes the intepreter JVM ?