newbie
newbie

Reputation: 24645

How to make Java plugins?

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?

Upvotes: 3

Views: 2746

Answers (2)

objects
objects

Reputation: 8677

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.

Upvotes: 5

Tom Hawtin - tackline
Tom Hawtin - tackline

Reputation: 147164

Use java.net.URLClassLoader.newInstance with your application's class loader as the parent.

Upvotes: 0

Related Questions