如何制作Java插件? [英] How to make Java plugins?

查看:362
本文介绍了如何制作Java插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想使我的Java程序能够接受插件,那么如何使Java插件使用核心程序的类而不将所有代码都包含在插件代码中?插件如何能够访问程序界面而不将其包含到自己的jar文件中?

If I want to make my Java program to be able accept plugins, how can I make Java plugins to use classes of core program without including all the code to the plugin code? How plugin can have access to programs interface without including it to it's own jar file?

推荐答案

看看 Java插件框架. 它使用扩展点或应用程序中旨在扩展的位置的概念.插件是扩展您的应用程序的手段.

Have a look at the Java Plugin Framework. It uses the concept of extension points or places in your application that are designed to be extended. Plugins are the means that your application is then extended.

这篇关于如何制作Java插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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