• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM doubt

 
Anu satya
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have learnt that on compilation of a java code, it is converted into bytecode (.class file) and this .class file is used by JVM to execute on different OS / platforms.

so, should there be different types of JVMs specific to different OS ? or is there only one JVM for all the OS / platforms?

can anyone please clarify my doubt?

 
Bupjae Lee
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JVM should interpret (or compile) your platform-independent bytecode to platform-dependent native code.

Therefore each platform uses their own JVM.
 
swapnl patil
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JVM is OS dependent, different OS has different JVM thats why Java Is platform independent.

same thing for .Net CLR is different for differnet OS.
 
Anu satya
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.
Thank you Patil and Lee,
Thank you very much.


 
r suraaj
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in order to execute the .class files JVM is enough ? or there should be any other components in jre required in addition to jvm?

and one more doubt is .,

in general ., in mobile devices only jvm is installed or jre is installed ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See #18 in the JavaBeginnersFaq. A JVM by itself is not sufficient to execute Java code.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49472
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this link about mobile devices, and see whether it answers your question. Don't know myself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic