I am making a program for computer surveillance at the moment. It's for a competition in my country Croatia(InfoKup). I have several options for sending command to another PC, but I want to make the possibility for the command extension for people who know Java. So I want to make the user be able to add some of his custom commands for the program. For example something like Minecraft mods. I know it is possible, but how would I go about doing that.
Any help would be greatly appreciated. My code on GitHub:GitHub
Don't mind the stream thing.
It's something my friend is experimenting with.
Currently I have the possibility to send popups to another PC. What if the extension maker knew the code to send cmd commands and wants to add that function. He makes an extension and puts it in the extension folder. Voila we have a new possibility.
Basically what I want to have possible is the user to drop the "mod/extension/whatever" in the "mod/extension/whatever" folder, and the program would load it and put all of the buttons declared in the class in to the GUI, and with them the function.
e.g.
package sth.sth;
import blah.blah.*;
public class ClassSTH extends SchoolarButton{
public ClassSTH(String params){
super(params);
}
@Override
public void OnClick(){
doStuff();
}
}
This is a duplicate of a deleted question. (I deleted it). It was closed but now I improved it.