public static boolean isLinux() {
return System.getProperty("os.name").toLowerCase().contains("linux");
}
public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("windows");
}
uploadSealFile_LinuxPath=/home/file/sealFile
uploadSealFile_WindowsPath=E:/home/file/sealFile
Properties properties = new Properties();
URL in = this.getClass().getClassLoader().getResource("uploadFile.properties");
try {
properties.load(new FileInputStream(in.getFile()));
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
if(AppCommonUtils.isLinux()){
realFilePath = properties.getProperty("uploadSealFile_LinuxPath") + "/" + realFileName;
}else if(AppCommonUtils.isWindows()){
realFilePath = properties.getProperty("uploadSealFile_WindowsPath") + "/" + realFileName;
}
}