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