I have Five Jar files.All jar files contain Same Class Play And Same Method PlayGame() But having different logic of playing game. Example :
Class Play{
public String PlayGame(){
//logic for playing Game
//each jar contain different logic for playing game
}
}
I have One main application and it contains all five jars included. My main application calls PlayGame() method.
I want that, on football select, PlayGame() method of football jar should be called. On hockey select, PlayGame() method of Hockey jar should be called. So on...
My all different implementation of playing game are in different jars. Because My application accepts jar from user of his implementation and places it in classpath and Restarts application.
Please help,How i should proceed to achieve this. Thank You