OSGi的基本主题是什么? [英] What is the underlying theme in OSGi?

查看:92
本文介绍了OSGi的基本主题是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OSGi是用于Java的动态模块化系统.好的,但是基线主题是什么,为什么要开发OSGi?使用OSGi有什么好处?开发OSGi的主要故事是什么?为什么存在?

OSGi is a dynamic modular system for Java. Ok, but what is the base line theme, why was OSGi developed? What are the benifits of using OSGi? What is the main story of developing OSGi? Why does it exist?

推荐答案

如果仔细看,Java中的类路径概念确实很烂.

If you look closer, the concept of classpath in Java really sucks.

您将类分发到JAR文件中,但是在运行时,Java将(几乎)盲目地将所有JAR文件中的所有类扔到一个大袋子中,同名类相互遮盖,然后以意外的方式进行交互.

You distribute your classes in JAR files, but during runtime Java will (almost) blindly throw all the classes from all the JAR files into one big bag where classes with the same name overshadow each other and then interact in unexpected ways.

OSGi为Java平台带来了适当的运行时模块化,并在此强大的服务模型(有时称为"JVM内部的SOA")的基础上.

OSGi brings a proper runtime modularity to Java platform and on top of that a powerful service model, sometimes referred to as "SOA inside the JVM".

我强烈建议您阅读一些有关OSGi的介绍性文章,这些文章将对这一切意味着一个更具体的想法.一个不错的起点可能是Alex Blewitt撰写的有关Java模块化的InfoQ系列文章:

I would strongly recommend reading some introductory articles about OSGi that will give a more concrete idea of what this all means. A good starting point might be the series of articles on InfoQ about Java modularity by Alex Blewitt:

  • Modular Java: What Is It?
  • Modular Java: Static Modularity
  • Modular Java: Dynamic Modularity

这篇关于OSGi的基本主题是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆