public ImageApi throws Exception logger info Checking OS init the API

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public ImageApi() throws Exception {
logger.info("Checking OS.....");
// init the API with curent os..
try {
switch (Utils.getOperatingSystemType()) {
case LINUX:
System.load(config.getConfigurationEntry(Constants.PATH_TO_NATIVE_LIB_LINUX));;
break;
case WINDOWS:
throw new Exception("Windows OS does not support!!!!!!!!");
case MACOS:
throw new Exception("Mac OS does not support!!!!!!!!");
case OTHER:
throw new Exception("Current OS does not support!!!!!");
default:
throw new Exception("Your OS does not support!!!");
}
} catch (java.lang.UnsatisfiedLinkError e){
logger.debug(e.getMessage());
logger.debug("Trying to load locally...");
OpenCV.loadLocally();
}
}