Last change
on this file since 7444 was 7444, checked in by kjdon, 20 years ago |
added in an isWindows function
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
720 bytes
|
Line | |
---|
1 |
|
---|
2 | package org.greenstone.gsdl3.util;
|
---|
3 |
|
---|
4 |
|
---|
5 | import java.util.HashMap;
|
---|
6 | import java.util.Set;
|
---|
7 | import java.util.Map;
|
---|
8 | import java.util.Iterator;
|
---|
9 | import java.util.Properties;
|
---|
10 |
|
---|
11 | /** contains miscellaneous functions */
|
---|
12 | public class Misc {
|
---|
13 |
|
---|
14 | public static void printHash(HashMap map) {
|
---|
15 | Set entries = map.entrySet();
|
---|
16 | Iterator i = entries.iterator();
|
---|
17 | while (i.hasNext()) {
|
---|
18 | Map.Entry m = (Map.Entry)i.next();
|
---|
19 | String name = (String)m.getKey();
|
---|
20 | String value = (String)m.getValue();
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public static boolean isWindows() {
|
---|
25 | Properties props = System.getProperties();
|
---|
26 | String os_name = props.getProperty("os.name","");
|
---|
27 | if(os_name.startsWith("Windows")) {
|
---|
28 | return true;
|
---|
29 | }
|
---|
30 | return false;
|
---|
31 | }
|
---|
32 |
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.