• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

When JVM will be started?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Sorry if it is a silly question.

When the JVM will be started in the system? whether as soon as I start the system or run the first Java program?

Thanks,
Senthil.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Definitely not at the booting(Start time) of the system.

I presume that the Java virtual machine knows nothing of the Java programming language, only of a particular binary format, the class file format and a class file contains Java virtual machine instructions (or bytecodes) or other ancillary information required to run the application or to manipulate the memory at run-time.

so I feel that the JVM is like a thread that starts, sleeps and gets invoked by class files.

wanna know about JVM.
check out this .
http://java.sun.com/docs/books/vmspec/2nd-edition/html/VMSpecTOC.doc.html

[ September 19, 2005: Message edited by: Manikanta Sabarish ]
[ September 19, 2005: Message edited by: Manikanta Sabarish ]
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, kids, the JVM isn't a daemon which runs in the background. When you start a Java program, you do so by running an executable (java.exe, javaw.exe, or similar). That executable is the JVM implementation. When that executable exits -- i.e., when the program is over -- the JVM exits. In the standard implementation, anyway, there's no magical waiting around.
 
senthil rajan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot guys.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that this means that every time you start a program a new instance of the JVM is started. This also means that if you have two Java programs running at the same time, there are also two JVMs running. The two Java programs don't share a JVM.

Layne
 
Manikanta Sabarish
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U guys are Absolutely right.

However in that case if we have several applications( like web applications,swing,stand-alone..) running simultaneously,we will have several JVM's running ....?

I am not sure ,could some shed some light on this.

Tx
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Manikanta Sabarish:
U guys are Absolutely right.

However in that case if we have several applications( like web applications,swing,stand-alone..) running simultaneously,we will have several JVM's running ....?

I am not sure ,could some shed some light on this.

Tx



For desktop, stand-alone applications, yes there will be several JVM's running. For web applications, I think the answer is more complicated. However, I don't know enough about web apps to say anything further.

Layne
 
Manikanta Sabarish
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I presume that Java Runtime Env is used mostly for web-Applications (like servlets,JSP..).In this case since JRE is needed on both server and client side ,I guess we will have less overhead in competeting with our No. of JVM's running on our(SERVER) side.

Also I feel that the scalability/Server Extensions(separate executable modules) features of Java will definetely help optimize the use of JVM's on our side.

Tx
[ September 20, 2005: Message edited by: Manikanta Sabarish ]
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Manikanta Sabarish:
I presume that Java Runtime Env is used mostly for web-Applications (like servlets,JSP..).In this case since JRE is needed on both server and client side ,I guess we will have less overhead in competeting with our No. of JVM's running on our(SERVER) side.

Also I feel that the scalability/Server Extensions(separate executable modules) features of Java will definetely help optimize the use of JVM's on our side.



No idea what you're saying here: web applications run on a server machine; no JRE is required on any other machine. Web applications don't in any way distribute the computation onto the client (except for AJAX apps that include lots of JavaScript on the client, I suppose.)

An application server is typically one JVM, or multiple JVMs, one per server on a server farm. Lots of servlets can run in that one JVM.
 
Manikanta Sabarish
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks man.
I got a little over drunk.
 
reply
    Bookmark Topic Watch Topic
  • New Topic