开发者

why java vitural machine specifucation still is the 1999 version [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

the jvm spec version 2: http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html seems quite old.

java has been release new versions, quite a lot changed. java 5, java6..

But it seems the jvm spec stays the same.

does it mean it is just out of date? or the new java language f开发者_高级运维eature just doesn't change the jvm spec. even a lot has introduced for example generics, concurrency , and jvmti in 1.5?

Or is it because jvm only related to run the class file and the class file has not changed and how to run them's spec has not changed?

I am a little confused on this topic.


You just didn't look well enough ;) But I agree this is quite unintuitive and problematic. See here for changes to the spec. but notice that eg generics were implemented in such a way to not need changes to the JVM, so there weren't many changes to the spec necessary.

Though I'm not sure if the above list is complete (actually I'd think that changes to the switch statement in Java7 will have to be handled on the JVM level, since this needs a completely different approach to the current two solutions) and in general I agree that it would indeed be quite good to have an up to date version of the spec with all the clarifications and additions included.

PS: I think the largest changes to the JVM itself were the changes to the memory model with Java5 (ie giving volatile read/writes acquire/release semantics).


Once you have a reasonably full language (Turing complete, ways to interface to O/S services), most things from then on are best added using one of...

  1. Libraries.
  2. Syntactic or other sugar, that effectively translates down to that underlying reasonably full language, or at least something that can be implemented using the same "back end".

One advantage of the second point in paricular is easier compatibility between versions. Code built for newer versions of the language can sometimes still run on older versions of the VM.

The JVM is presumably a well-designed virtual machine, that simply didn't need much upgrading.


I suspect that the real reasons that there is not a 3rd edition of the JVM spec are one or more of the following:

  • One of the authors (Tim Lindholm) now works for Google.

  • It takes a lot of effort to produce a book and the Oracle folks who would do it are busy with other things.

  • Oracle has looked at the return on investment, and decided that it is not worth it.

  • The publisher looked at the book sales and decided that it is not worth it.

I expect a 3rd edition will emerge eventually. In the meantime, the Addenda tell you what has changed in Java 5 and Java 6, and tell you where to go to get the details.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜