aspose file tools*
The moose likes Beginning Java and the fly likes JVM doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JVM doubt" Watch "JVM doubt" New topic
Author

JVM doubt

saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

I am using Windows XP and jdk 1.7 is installed on it.Now i want to that when JVM does load in my computer ? It does load automatically when my computer starts or it loads when i use javac and java command to run my java program ? and When JVM does unload ?


Tell the difficulties that i am difficult.
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1512
    
    5

JVM is started (or loaded) during actual execution of a Java program. That is, whenever java.exe(or java in case of Linux) is executed, JVM is started. When execution of java.exe ends, JVM ends and so on.

Please note that JVM is not required during compilation (i.e. javac command).


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14435
    
  23

Anayonkar Shivalkar wrote:Please note that JVM is not required during compilation (i.e. javac command).

The Java compiler included with the JDK (javac) is itself written in Java for the largest part, so it does need a JVM to run.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1512
    
    5

Jesper de Jong wrote:The Java compiler included with the JDK (javac) is itself written in Java for the largest part, so it does need a JVM to run.

Yes. However, our code does not run there - that is, our classes won't be loaded and so on.

Anyways, I missed this part - JVM is required during compilation as well, so it will be loaded during javac as well.

Apologies for wrong info.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40058
    
  28
There is a Java Language Specification (JLS) section all about that. The JLS is by no means easy to understand, however.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM doubt