imported_Ned Flanders
Senior member
If I wanted to make an (Java) app that I wanted to be plugin compatable, how would I go about doing this?
The only way I can see to do this is:
-Have a plugin folder
-Get all the .class files in the folder and load them into an array within my main app
-Each plugin class would have a standard Construtor which took an instance of my main app
-Most of my program variables would need to be set to public - then the plugin classes could make changes how they wish (such as replace an actionListener on a JPanel etc)
Is this an acceptable method?
Thanks
The only way I can see to do this is:
-Have a plugin folder
-Get all the .class files in the folder and load them into an array within my main app
-Each plugin class would have a standard Construtor which took an instance of my main app
-Most of my program variables would need to be set to public - then the plugin classes could make changes how they wish (such as replace an actionListener on a JPanel etc)
Is this an acceptable method?
Thanks