JLS、Java以及相关技术之间有什么关系?

发布于 2024-09-28 05:39:10 字数 158 浏览 0 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

还不是爱你 2024-10-05 05:39:10

从某种程度上来说,这是自然语言的歧义问题;其中一些事情在不同的时间可能意味着不同的事情。

  • “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,但从开发人员的角度来看,区别主要在于库的使用;语法是相同的。

类似的问题:

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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文