There are parts of the program that are affected by OS type. so i try to branch by os name as below. when I run it locally,it works. but I run it as a client program after uploading it to the server, it seems that it can not get the os name. Please let me know how can i get the os name from the client program. thanks.
public void getOSName() {
String osName = System.getProperty("os.name")
if(!osName.trim().toUpperCase().equals("WINDOWS 10")){
run();
}else{
}
}