当每个人都对 OSGi 进行标准化时,为什么 Sun 还要发明另一个模块系统?

发布于 2024-08-13 22:33:23 字数 365 浏览 5 评论 0原文

Sun 投入了大量精力以 Jigsaw 的形式对 JDK 进行模块化,并暗示这一点它也应该成为其他 Java 开发人员选择的模块格式。使用此功能的唯一著名参与者是 NetBeans(及其衍生应用程序)。

另一方面,业界已经围绕 OSGi 进行了标准化,所有主要应用程序供应商都将其运行时基于模块平台,甚至包括 Sun 自己的 Glassfish。甚至还有一个 NetBeans 端口可以使用 OSGi 作为模块系统,而不是 NetBeans 自己的模块。甚至 Maven 也在努力成为 OSGi 运行时。

仅仅是 NIH、许可还是其他原因?

Sun is putting a lot of effort behind modularising the JDK in the form of Jigsaw, and insinuating that it should be the module format of choice for other Java developers as well. The only notable player who is using this is NetBeans (and derivative applications).

On the other hand, the industry has standardised around OSGi, with all of the major application vendors basing their runtimes on the module platform, even Sun's own Glassfish. There's even a port of NetBeans to use OSGi as the module system instead of NetBeans own modules. Even Maven is working towards becoming an OSGi runtime.

Is it just NIH, licensing, or another reason?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(5

她比我温柔 2024-08-20 22:33:23

引用 http://blogs.oracle.com/mr/entry/jigsaw

OSGi 根本没有与
然而,Java 语言已经
构建在 Java SE 平台之上
而不是从内部。

最后一个问题可以解决。太阳
现在计划直接与
OSGi联盟以便未来版本
OSGi 框架可以完全
利用 JSR 294 的功能和
从而实现更紧密的集成
与语言。

(...)

如果以及何时发布未来版本
Java SE 平台包括一个特定的
那么Sun将提供一个模块系统
意味着将 Jigsaw 模块迁移到
那个标准。在此期间我们将
积极寻求方法
与其他模块互操作
系统,特别是 OSGi。

Citing http://blogs.oracle.com/mr/entry/jigsaw:

OSGi is not at all integrated with the
Java language, however, having been
built atop the Java SE Platform rather
than from within it.

This last problem can be fixed. Sun
plans now to work directly with the
OSGi Alliance so that a future version
of the OSGi Framework may fully
leverage the features of JSR 294 and
thereby achieve tighter integration
with the language.

(...)

If and when a future version of the
Java SE Platform includes a specific
module system then Sun will provide a
means to migrate Jigsaw modules up to
that standard. In the meantime we’ll
actively seek ways in which to
interoperate with other module
systems, and in particular with OSGi.

尘世孤行 2024-08-20 22:33:23

Jigsaw 团队在 Java Posse Podcast 中概述了 Jigsaw 项目背后的基本原理以及它与 OSGi 的关系259

这些项目并不完全重叠,Jigsaw 的引入并没有敲响 OSGi 的丧钟——OSGi 的范围超出了 Jigsaw 的任何尝试。 Jigsaw 还提供了 OSGi 团队无法提供的更多内容(语言、类和 JVM 实现更改)。 OSGi的设计是基于当前的JVM设计——对JVM的改变将使所有人受益。

至少,这是我从我读过的内容中得到的内容。

The rationale behind project Jigsaw and how it relates to OSGi was outlined by the Jigsaw team in Java Posse Podcast 259.

These projects do not entirely overlap and the introduction of Jigsaw does not sound the death knell for OSGi - the scope of OSGi goes beyond anything Jigsaw will attempt. There's much more to Jigsaw than the OSGi team is in a position to provide (language, class and JVM implementation changes). The design of OSGi is based on the current JVM design - the changes to the JVM will benefit everyone.

At least, that is my take from what I've read.

信仰 2024-08-20 22:33:23

很好的问题。我的理解是,在某些领域,OSGi 远远超出了 JVM 模块所需的范围(及其带来的所有相应的复杂性),而在其他领域,它还不够。所以它们之间有很多重叠,但可能还不够。

查看此博客条目

Excellent question. My understanding is that in some areas OSGi goes way beyond that which is necessary for JVM modules (with all the corresponding complexity that brings) whilst in other areas it doesn't go far enough. So there's a lot of overlap between them but perhaps not enough.

See this blog entry

江挽川 2024-08-20 22:33:23

Check out the JavaPosse interview with Mark Reinhold on the subject.

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