简体   繁体   English

不同的Java平台有何正确之处?

[英]What is correct about the different Java platforms?

I have read the link below and I have some questions regarding Java. 我已阅读下面的链接,并且对Java有一些疑问。 Is Java Standard Edition a specification the same way as Java Enterprise Edition, and the Java Runtime Environment is the Virtual Machine the same Glassfish is the VM and runtime for Enterprise Edition? Java Standard Edition的规范与Java Enterprise Edition的规范是否相同,并且Java Runtime Environment是虚拟机还是Enterprise Edition的VM和运行时相同的Glassfish?

If so, are there other alternatives to to the Java SE VM the same way you can choose between Glassfish, JBoss etc? 如果是这样,您可以在Glassfish,JBoss等之间进行选择的方式是否还可以替代Java SE VM?

http://docs.oracle.com/javaee/6/firstcup/doc/gkhoy.html http://docs.oracle.com/javaee/6/firstcup/doc/gkhoy.html

When people say Java they usually refer to the Java Standard Edition. 人们说Java时通常会引用Java标准版。 But technically Java is a set of specifications (the language specification, the VM specification). 但是从技术上讲Java是一组规范(语言规范,VM规范)。 Any one can implement a VM that conforms to these specifications. 任何人都可以实施符合这些规范的VM。 For a list of JVMs please refer http://en.wikipedia.org/wiki/List_of_Java_virtual_machines . 有关JVM的列表,请参阅http://en.wikipedia.org/wiki/List_of_Java_virtual_machines

There are some alternatives. 有一些选择。

One I know is JRocket 我知道的一个是JRocket

J2SE is in itself supported by a specification (see JSR270 ) but J2SE does not include the defining rules for implementing a Java Virtual Machine (JVM). J2SE其自身是在一个规范的支持(见JSR270 ),但J2SE 包括用于实现Java虚拟机(JVM)的定义规则。 Although the JVM is defined by a specification , you probably are referring to the definition of the language itself which is defined in yet another specification (the JLS ). 尽管JVM是由规范定义的,但您可能仍指的是语言本身的定义,该定义是在另一个规范( JLS )中定义的。

Regarding the JVM, there are several implementations (as with J2EE). 关于JVM,有几种实现(与J2EE一样)。 This SO question lists several. 这个 SO问题列出了几个。

Back to your main question, though. 回到您的主要问题。 The J2SE spec defines a collection of a basic set of support services that Java applications commonly use. J2SE规范定义了Java应用程序通常使用的一组基本支持服务的集合。 If you look at it, the specification is basically an index for other specifications that then describe each of those technologies. 如果您看一下,该规范基本上就是其他规范的索引,这些规范随后描述了每种技术。 Don't confuse specification (the JSR) with the reference implementation, which is the actual implementation of that specification (which is what you download from Oracle when getting the J2SE package). 不要将规范(JSR)与参考实现混淆,后者是该规范的实际实现(这是在获取J2SE软件包时从Oracle下载的)。

Just to sum it up: 总结一下:

  • Specification that defines the Java language: JSR 901 定义Java语言的规范:JSR 901
  • Specification for the JVM: JSR 924 JVM规范:JSR 924
  • J2SE: JSR 270 J2SE:JSR 270

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM