I have a java project where I use an external jar (not controlled by me). Until now whenever that a new version of that library is out, I update my project to use the more recent one, but now is required that the project uses different versions of that library.
My problem is I don't have any clue how to do that. How do I tell in java to make the imports according a version of a jar,
What I need to do:
int versionFlag = getVersion2use();
if(verssionFlag = 0){
use imports from last version
}else if(verssionFlag = 1){
use imports from last version 1
} else if(verssionFlag = 2){
use imports from last version 2
}
This is to be used at runtime!