File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes confusing about JVM. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "confusing about JVM." Watch "confusing about JVM." New topic

confusing about JVM.

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 557

I read following links
List of Java virtual machines.
Da Vinci Machine.

I get question if we compile our program using hotspot (which is primary jvm), after that try to execute in pc which contain other jvm, then our program runs?
What is necessary of these many jvms?

Millions saw the apple fall, but Newton asked why.
Gulsum Ramazanoglu
Ranch Hand

Joined: Jun 27, 2008
Posts: 51
Mandar, as far as I understand, JVMs are kind of interpreters taking the compiled Java program(which named, "bytecode") and making it run on an operating system, BY INTERPRETING it.. to be able to interpret, it takes the code and converts it to another code that, THAT operating system understands and run.. to be able to do that, it has to be prepared for THAT specific operating system... so every JVM (which is actually a little program) must be written to run on a specific operating system.. In better words, they are designed to work in this way...
Thats what I understand..
A very useful link is this... Please take a look..
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46362
You don't use HotSpot (not "hotspot") to compile a program, but to execute it. The bytecode is identical for all operating systems, so different JVMs can execute it.

Gulsum, Alan Moore has already pointed out the link you quoted is an out of date book: in this thread.
I agree. Here's the link:
subject: confusing about JVM.
It's not a secret anymore!