Documentation

The Java™ Tutorials
Hide TOC
Creating and Using Extensions创建和使用扩展
Trail: The Extension Mechanism延伸机制

Lesson: Creating and Using Extensions课程:创建和使用扩展

Any set of packages or classes can easily be made to play the role of an extension. 任何一组包或类都可以轻松地扮演扩展的角色。The first step in turning a set of classes into an extension is to bundle them in a JAR file. 将一组类转换为扩展的第一步是将它们绑定到JAR文件中。Once that's done, you can turn the software into an extension in two ways:完成后,您可以通过两种方式将软件转换为扩展:

This lesson shows you how the extension mechanism works by using a simple "toy" extension as an example.本课程以一个简单的“玩具”扩展为例,向您展示了扩展机制的工作原理。

Installed Extensions已安装的扩展

In this section, you'll create a simple installed extension and see how extension software is treated as part of the platform by the runtime environment.在本节中,您将创建一个简单的已安装扩展,并了解运行时环境如何将扩展软件视为平台的一部分。

Download Extensions下载扩展

This section will show you how modify a JAR file's manifest so that the JAR-bundled software can make use of download extensions.本节将向您展示如何修改JAR文件的清单,以便JAR捆绑软件可以使用下载扩展。

Understanding Extension Class Loading理解扩展类加载

This section is a short detour that summarizes the Java platform's delegation model for loading classes, and shows how it relates to loading classes in extensions.本节是一个简短的迂回,总结了Java平台加载类的委托模型,并展示了它与在扩展中加载类的关系。

Creating Extensible Applications创建可扩展应用程序

This section discusses the mechanism used to extend an application, via plug-ins or modules, without modifying its original code base.本节讨论通过插件或模块扩展应用程序而不修改其原始代码库的机制。

The next lesson, Making Extensions Secure uses the same extension to show how the Java platform controls the security permissions that are granted to extensions.下一课,使扩展安全使用相同的扩展来展示Java平台如何控制授予扩展的安全权限。


Previous page: Table of Contents
Next page: Installed Extensions