为J2SE应用程序添加插件支持的最佳技术? [英] Best technology for adding plugin support to a J2SE application?

查看:129
本文介绍了为J2SE应用程序添加插件支持的最佳技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个J2SE桌面应用程序,需要其中一个组件可插拔。我已经为这个插件定义了Java接口。用户应该能够在运行时(通过GUI)选择他们想要使用的这个接口的实现(例如在初始化对话框中)。我设想将每个插件打包为一个JAR文件,其中包含实现类以及它可能需要的任何帮助程序类。

I'm writing a J2SE desktop application that requires one of its components to be pluggable. I've already defined the Java interface for this plugin. The user should be able to select at runtime (via the GUI) which implementation of this interface they want to use (e.g. in an initialisation dialog). I envisage each plugin being packaged as a JAR file containing the implementing class plus any helper classes it may require.

在桌面上执行此类操作的最佳技术是什么Java应用程序?

What's the best technology for doing this type of thing in a desktop Java app?

推荐答案

经过多次尝试基于插件的Java架构(你似乎正在寻找什么),我最终发现 JSPF 是Java5代码的最佳解决方案。它没有像解决方案那样的OSGI的巨大需求,而是相当容易使用。

After many tries for plugin-based Java architectures (what is precisely what you seem to look for), I finally found JSPF to be the best solution for Java5 code. it do not have the huge needs of OSGI like solutions, but is instead rather easy to use.

这篇关于为J2SE应用程序添加插件支持的最佳技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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