서버 테스트 반영

This commit is contained in:
Rinjae
2025-10-22 11:32:36 +09:00
parent 798f4e7ace
commit 3b7c4d4683
10 changed files with 170 additions and 48 deletions
@@ -0,0 +1,24 @@
package com.eactive.ext.kjb.utils;
import java.net.InetAddress;
public class OsUtil {
public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("win");
}
public static boolean isLinux() {
String os = System.getProperty("os.name").toLowerCase();
return os.contains("nux") || os.contains("nix") || os.contains("aix") ;
}
public static String getHostName() {
try {
return InetAddress.getLocalHost().getHostName();
} catch (Exception e) {
String name = System.getProperty("COMPUTERNAME");
if (name == null) name = System.getenv("HOSTNAME");
return name != null ? name : "unknown";
}
}
}