1 |
package tools; |
2 |
|
3 |
import java.net.*; |
4 |
|
5 |
public class Machine { |
6 |
|
7 |
public static String getClient() { |
8 |
|
9 |
String client = ""; |
10 |
|
11 |
try { |
12 |
client = InetAddress.getLocalHost().getHostName(); |
13 |
} catch (Exception e) { |
14 |
System.out.println(e); |
15 |
} |
16 |
|
17 |
return client; |
18 |
|
19 |
} |
20 |
|
21 |
public static String getOSArch() { |
22 |
|
23 |
return (System.getProperty("os.arch")); |
24 |
|
25 |
} |
26 |
|
27 |
public static String getOSName() { |
28 |
|
29 |
return (System.getProperty("os.name")); |
30 |
|
31 |
} |
32 |
|
33 |
public static String getOSver() { |
34 |
|
35 |
return (System.getProperty("os.version")); |
36 |
|
37 |
} |
38 |
|
39 |
} |
40 |
|