JLS、Java以及相关技术之间有什么关系?
Java是语言,JRE是运行环境,JDK是开发工具? JLS 规范规定 JRE 必须执行 x、y、z,从而使 Java 成为现实?这些观点是否正确,如果不正确,有人可以启发我吗?
有没有什么东西我们认为是 Java 但其实不是?我想我听说过有关 Android 的说法 - 这是真的吗?
Java is the language, the JRE is the runtime environment, and the JDK are the development tools? The JLS is the spec that says that the JRE must do x,y,z, and therefore makes Java what it is? Are these views correct, and if not can someone enlighten me?
Are there any things we think are Java but are not? I think I heard that about Android -- is it true?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从某种程度上来说,这是自然语言的歧义问题;其中一些事情在不同的时间可能意味着不同的事情。
“Java”可以指 Java 语言,如“我用 Java 编写了这个令人惊叹的 FooWidget”。它也可以是 Java 平台的简写,包括语言、运行时、工具等,如“您需要 Java 才能使用此 Web 应用程序”。
JRE 代表 Java 运行时环境,是 Java 虚拟机中包含的一组 API 捆绑包。 JDK,或Java 开发工具包,是一组开发工具,包括 Java 编译器、调试器、javadoc 编译器等。令人困惑的是,它还包括一个 JRE(例如,在 Eclipse 中可以将 JDK 指定为项目的运行时)。
Java 语言规范 (JLS) 是 Java 语言的规范。换句话说,它描述了该语言如何实现的技术细节。
Android 是一个平台,其中代码是用 Java 编写的,但编译后运行在 Dalvik 虚拟机而不是 JVM 上。从这个意义上说,它实际上不是 Java,但从开发人员的角度来看,区别主要在于库的使用;语法是相同的。
类似的问题:
都是什么意思?有时你可以发展
使用 JRE,有时您需要
JDK?
?
To some extent this is a problem of the ambiguity of natural language; some of these things can mean different things at different times.
"Java" can refer to the Java language, as in "I wrote this amazing FooWidget in Java." It can also be shorthand for the Java platform including the language, runtime, tools, etc., as in "You'll need Java to use this web application."
JRE stands for Java Runtime Environment and is the bundled set of APIs included with the Java Virtual Machine. The JDK, or Java Development Kit, is the set of developer tools including the Java compiler, debugger, javadoc compiler, etc. Confusingly, it also includes a JRE (as seen in Eclipse, for example, where the JDK can be specified as the runtime for a project).
The Java Language Specification (JLS) is, um, the spec for the Java Language. Put another way, it describes the technical details of how the language is implemented.
Android is a platform in which the code is written in Java, but compiled to run on the Dalvik virtual machine rather than the JVM. In that sense, it isn't actually Java, but from the perspective of the developer the difference is mostly library use; the syntax is the same.
Similar questions:
all mean? Sometimes you can develop
with JRE and sometimes you need
JDK?
of ?