开发者

What is the difference amongst JVM Spec, JVM Implementation, JVM Runtime

I read the following words but I like to know diffe开发者_Go百科rences among them... JVM Spec, JVM Implementation, JVM Runtime


JVM Spec: document describing how the JVM should behave.

JVM Implementation: an implementation of a JVM based on the JVM Spec.

JVM Runtime: an instance of a JVM implementation.


the jvm spec is just a document that describes how a java virtual machine must work. Anybody is free to take that spec and build their own jvm implementation. Think of the spec like a blueprint, and the implementation like the house you build from it. As a contractor you are free to make minor changes, different materials etc, as long as the blueprint is followed.

The JVM runtime is the implementation. The runtime is what is execute when you use the java command. As i said, different companies have made their own implementations of the jvm runtime from the spec.


JVM Spec: A document, which describes an ideal virtual machine's features and behavior. It's a guideline to develop your own virtual machine with flexibility, such as how to manage memory.

JVM Implementation: A real virtual machine, which implements JVM Spec. There are lots of JVM implementations, such as HotSpot and JRockit, which have their own features and apply to different scenes to resolve different problems.

JVM Runtime: Maybe you mean "Java Runtime". It's a running JVM implementation, on which Java application is executing.


JVM Spec is specification of JVM, describe what a JVM should be and what function a JVM should support. JVM Implementation is a real JVM implemented by the vendors, the JVM should fulfill all the entire specification. JVM Runtime is a running program that which support java specified feature.


JVM Runtime : Instance of JVM which runs your class file or application.

We run a java class as : java classFileName

So in above command; java is actually jvm instance ( or object). Thus there is one instance for every application running on the given machine. So if 5 applications are running at same time on your machine; this means that there are 5 JVM instances. Each instance manages its application. This is done to make sure that each application runs in a secure environment.

JVM Implementation : Java component which helps you to run your app/class file. There are different implementation by companies specific to platform ( like microsoft implementation of JVM for windows)

JVM Spec : Specification for implementing JVM. All JVM implementation should follow specification.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜