Answer the question
In order to leave comments, you need to log in
How can I connect plugins to a java application?
Hello. They gave me a test task. You need to write a GUI application with the ability to connect modules (that is, plugins). Moreover, the program should not be restarted when they are connected (everything should be applied immediately). I don't know yet how to implement it.
In addition, I'm also interested in the following. When the plugin is connected, the main form of the program will change, that is, some buttons, fields, and so on will appear. And I still don't know how to do it. There are thoughts of digging towards repaint(), but I'm not sure yet (didn't work with it).
Threat No third-party frameworks can be used, only what is in Java itself.
Answer the question
In order to leave comments, you need to log in
You need to write a GUI application with the ability to connect modules (that is, plugins). Moreover, the program should not be restarted when they are connected (everything should be applied immediately).
// Где-то там, где реализуется плагин
class MyClass implements MyPluginInterface {}
// У нас тут, в модульной софтинке
try {
Class c = Class.forName("com.vasyapupkin.MyClass");
} catch (ClassNotFoundException e) {
// log error
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question