Source Code Cross Referenced for Os.java in  » Net » Terracotta » com » tc » util » runtime » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Terracotta » com.tc.util.runtime 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
003:         */package com.tc.util.runtime;
004:
005:        import java.io.File;
006:
007:        /**
008:         * O/S functions
009:         *
010:         * @author teck
011:         */
012:        public class Os {
013:
014:            private Os() {
015:                // nada
016:            }
017:
018:            public static String getOsName() {
019:                return System.getProperty("os.name", "unknown");
020:            }
021:
022:            public static String platform() {
023:                String osname = System.getProperty("os.name", "generic")
024:                        .toLowerCase();
025:                if (osname.startsWith("windows")) {
026:                    return "win32";
027:                } else if (osname.startsWith("linux")) {
028:                    return "linux";
029:                } else if (osname.startsWith("sunos")) {
030:                    return "solaris";
031:                } else if (osname.startsWith("mac")) {
032:                    return "mac";
033:                } else
034:                    return "generic";
035:            }
036:
037:            public static boolean isWindows() {
038:                return (getOsName().toLowerCase().indexOf("windows") >= 0);
039:            }
040:
041:            public static boolean isLinux() {
042:                return getOsName().toLowerCase().indexOf("linux") >= 0;
043:            }
044:
045:            public static boolean isUnix() {
046:                final String os = getOsName().toLowerCase();
047:
048:                // XXX: this obviously needs some more work to be "true" in general (see bottom of file)
049:                if ((os.indexOf("sunos") >= 0) || (os.indexOf("linux") >= 0)) {
050:                    return true;
051:                }
052:
053:                if ((os.indexOf("mac") >= 0)
054:                        && (System.getProperty("os.version", "")
055:                                .startsWith("10."))) {
056:                    return true;
057:                }
058:
059:                return false;
060:            }
061:
062:            public static boolean isMac() {
063:                final String os = getOsName().toLowerCase();
064:                return os.startsWith("mac");
065:            }
066:
067:            public static boolean isSolaris() {
068:                final String os = getOsName().toLowerCase();
069:                return os.indexOf("sunos") >= 0;
070:            }
071:
072:            public static String findWindowsSystemRoot() {
073:                if (!isWindows()) {
074:                    return null;
075:                }
076:
077:                // commenting this out until we actually need it. I'm sick of seeing the
078:                // "use of deprecated API" warnings in our compiler output
079:                //
080:                // if (System.getProperty("java.version", "").startsWith("1.5.")) {
081:                // // System.getEnv(String name) is deprecated in java 1.2 through 1.4.
082:                // // Not only is it deprecated, it throws java.lang.Error upon invocation!
083:                // // It is has been un-deprecated in 1.5 though, so use it if we can
084:                // String root = System.getenv("SYSTEMROOT");
085:                // if (root != null) { return root; }
086:                // }
087:
088:                // try to find it by looking at the file system
089:                final char begin = 'c';
090:                final char end = 'z';
091:
092:                for (char drive = begin; drive < end; drive++) {
093:                    File root = new File(drive + ":\\WINDOWS");
094:                    if (root.exists() && root.isDirectory()) {
095:                        return root.getAbsolutePath().toString();
096:                    }
097:
098:                    root = new File(drive + ":\\WINNT");
099:                    if (root.exists() && root.isDirectory()) {
100:                        return root.getAbsolutePath().toString();
101:                    }
102:                }
103:
104:                return null;
105:            }
106:
107:        }
108:
109:        // Source: http://www.tolstoy.com/samizdat/sysprops.html
110:
111:        // Windows VMs
112:        //
113:        //
114:        //
115:        // ------------------------------------------------------
116:        // OS: Windows95
117:        // Processor: Pentium
118:        // VM: SunJDK1.0.2
119:        // Notes:
120:        // Contributor: CK
121:        //
122:        // os.name= "Windows 95" "windows 95"
123:        // os.arch= "x86" "x86"
124:        // os.version= "4.0" "4.0"
125:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
126:        // java.class.version= "45.3" "45.3"
127:        // java.version= "1.0.2" "1.0.2"
128:        // file.separator= "\" "\"
129:        // path.separator= ";" ";"
130:        // line.separator= "0xd,0xa" "0xd,0xa"
131:        //
132:        //
133:        // ------------------------------------------------------
134:        // OS: Windows95
135:        // Processor: Pentium
136:        // VM: SunJDK1.1.4
137:        // Notes:
138:        // Contributor: CK
139:        //
140:        // os.name= "Windows 95" "windows 95"
141:        // os.arch= "x86" "x86"
142:        // os.version= "4.0" "4.0"
143:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
144:        // java.class.version= "45.3" "45.3"
145:        // java.version= "1.1.4" "1.1.4"
146:        // file.separator= "\" "\"
147:        // path.separator= ";" ";"
148:        // line.separator= "0xd,0xa" "0xd,0xa"
149:        //
150:        //
151:        // ------------------------------------------------------
152:        // OS: Windows NT
153:        // Processor: x86
154:        // VM: Microsoft1.1
155:        // Notes:
156:        // Contributor: AB
157:        //
158:        // os.name= "Windows NT" "windows nt"
159:        // os.arch= "x86" "x86"
160:        // os.version= "4.0" "4.0"
161:        // java.vendor= "Microsoft Corp." "microsoft corp."
162:        // java.class.version= "45.3" "45.3"
163:        // java.version= "1.1" "1.1"
164:        // file.separator= "\" "\"
165:        // path.separator= ";" ";"
166:        // line.separator= "0xd,0xa" "0xd,0xa"
167:        //
168:        //
169:        // ------------------------------------------------------
170:        // OS: Windows NT 4.0
171:        // Processor: Pentium II
172:        // VM: JDK 1.1.6
173:        // Notes:
174:        // Contributor: NB
175:        //
176:        // os.name= "Windows NT" "windows nt"
177:        // os.arch= "x86" "x86"
178:        // os.version= "4.0" "4.0"
179:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
180:        // java.class.version= "45.3" "45.3"
181:        // java.version= "1.1.6" "1.1.6"
182:        // file.separator= "\" "\"
183:        // path.separator= ";" ";"
184:        // line.separator= "0xd,0xa" "0xd,0xa"
185:        //
186:        //
187:        // ------------------------------------------------------
188:        // My Windows NT 4.0 box with Java 1.1.6 reports:
189:        // Contributor: RG
190:        //
191:        // osName = WindowsNT
192:        // osArch = x86
193:        // osVersion = 4.0
194:        // vendor = Sun Microsystems Inc.
195:        // APIVersion = 45.3
196:        // interpeterVersion = 1.1.6
197:        //
198:        //
199:        // ------------------------------------------------------
200:        // OS: Windows CE 2.0
201:        // Processor: SH3
202:        // VM: Microsoft CE JDK Version 1.0
203:        // Notes: This was the February release - The line separator is interesting for
204:        // a windows machine...
205:        // Contributor: AW
206:        //
207:        // os.name= "Windows CE" "windows ce"
208:        // os.arch= "Unknown" "unknown"
209:        // os.version= "2.0 Beta" "2.0 beta"
210:        // java.vendor= "Microsoft" "microsoft"
211:        // java.class.version= "JDK1.1" "jdk1.1"
212:        // java.version= "JDK1.1" "jdk1.1"
213:        // file.separator= "\" "\"
214:        // path.separator= ";" ";"
215:        // line.separator= "0xa" "0xa"
216:        //
217:        //
218:        // ------------------------------------------------------
219:        // OS: NT Workstation 4.0
220:        // Processor: Pentium MMX 200Mhz
221:        // VM: SuperCede 2.03
222:        // Notes:
223:        // Contributor: AL
224:        //
225:        // os.name= "Windows NT" "windows nt"
226:        // os.arch= "x86" "x86"
227:        // os.version= "4.0" "4.0"
228:        // java.vendor= "SuperCede Inc." "supercede inc."
229:        // java.class.version= "45.3" "45.3"
230:        // java.version= "1.1.4" "1.1.4"
231:        // file.separator= "\" "\"
232:        // path.separator= ";" ";"
233:        // line.separator= "0xd,0xa" "0xd,0xa"
234:        //
235:        //
236:        // ------------------------------------------------------
237:        // OS: Windows 95
238:        // Processor: Pentium 166
239:        // VM: Netscape Communications Corporation -- Java 1.1.2
240:        // Notes: Obtained in Netscape Navigator 4.03.
241:        // Contributor: DG
242:        //
243:        // os.name= "Windows 95" "windows 95"
244:        // os.arch= "x86" "x86"
245:        // os.version= "4.0" "4.0"
246:        // java.vendor= "Netscape Communications Corporation""netscape
247:        // communications corporation"
248:        // java.class.version= "45.3" "45.3"
249:        // java.version= "1.1.2" "1.1.2"
250:        // file.separator= "\" "\"
251:        // path.separator= ";" ";"
252:        // line.separator= "0xa" "0xa"
253:        //
254:        //
255:        // ------------------------------------------------------
256:        // OS: Windows 95
257:        // Processor: Pentium 166
258:        // VM: Microsoft SDK for Java 2.01
259:        // Notes: Obtained in Internet Explorer 4 (version 4.71.1712.6).
260:        // Contributor: DG
261:        //
262:        // os.name= "Windows 95" "windows 95"
263:        // os.arch= "x86" "x86"
264:        // os.version= "4.0" "4.0"
265:        // java.vendor= "Microsoft Corp." "microsoft corp."
266:        // java.class.version= "45.3" "45.3"
267:        // java.version= "1.1" "1.1"
268:        // file.separator= "\" "\"
269:        // path.separator= ";" ";"
270:        // line.separator= "0xd,0xa" "0xd,0xa"
271:        //
272:        //
273:        // ------------------------------------------------------
274:        // OS: Windows 95
275:        // Processor: Pentium
276:        // VM: Netscape
277:        // Notes: Created in Netscape Navigator 3.01 for Win95.
278:        // Contributor: DG
279:        //
280:        // os.name= "Windows 95" "windows 95"
281:        // os.arch= "Pentium" "pentium"
282:        // os.version= "4.0" "4.0"
283:        // java.vendor= "Netscape Communications Corporation""netscape communications corporation"
284:        // java.class.version= "45.3" "45.3"
285:        // java.version= "1.02" "1.02"
286:        // file.separator= "/" "/"
287:        // path.separator= ";" ";"
288:        // line.separator= "0xa" "0xa"
289:        //
290:        //
291:        // ------------------------------------------------------
292:        // OS: Windows NT Workstation 4.0 Service Pack 3
293:        // Processor: Pentium II 266
294:        // VM: Sun JDK 1.2 beta 4
295:        // Notes:
296:        // Contributor: JH2
297:        //
298:        // os.name= "Windows NT" "windows nt"
299:        // os.arch= "x86" "x86"
300:        // os.version= "4.0" "4.0"
301:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
302:        // java.class.version= "45.3" "45.3"
303:        // java.version= "1.2beta4" "1.2beta4"
304:        // file.separator= "\" "\"
305:        // path.separator= ";" ";"
306:        // line.separator= "0xd,0xa" "0xd,0xa"
307:        //
308:        //
309:        // ------------------------------------------------------
310:        // OS: Windows NT Workstation 4.0 Service Pack 3
311:        // Processor: Pentium II 266
312:        // VM: Symantec Java! JustInTime Compiler Version 3.00.029(i) for JDK 1.1.x
313:        // Notes:
314:        // Contributor: JH2
315:        //
316:        // os.name= "Windows NT" "windows nt"
317:        // os.arch= "x86" "x86"
318:        // os.version= "4.0" "4.0"
319:        // java.vendor= "Symantec Corporation" "symantec corporation"
320:        // java.class.version= "45.3" "45.3"
321:        // java.version= "1.1.5" "1.1.5"
322:        // file.separator= "\" "\"
323:        // path.separator= ";" ";"
324:        // line.separator= "0xd,0xa" "0xd,0xa"
325:        //
326:        //
327:        // ------------------------------------------------------
328:        // OS: WinNT 4.00.1381
329:        // Processor: x86 Family 5 Model 6
330:        // VM: IE 3.02
331:        // Notes:
332:        // Contributor: PB
333:        //
334:        // os.name= "Windows NT" "windows nt"
335:        // os.arch= "x86" "x86"
336:        // os.version= "4.0" "4.0"
337:        // java.vendor= "Microsoft Corp." "microsoft corp."
338:        // java.class.version= "45.3" "45.3"
339:        // java.version= "1.0.2" "1.0.2"
340:        // file.separator= "\" "\"
341:        // path.separator= ";" ";"
342:        // line.separator= "0xd,0xa" "0xd,0xa"
343:        //
344:        //
345:        //
346:        //
347:        // --------------------------------------------------------------------------------
348:        //
349:        //
350:        // Mac VMs
351:        //
352:        //
353:        //
354:        // ------------------------------------------------------
355:        // OS: MacOS 7.5.1
356:        // Processor: PowerMac
357:        // VM: Metrowerks CodeWarrior Pro2, standard and JIT
358:        // Notes:
359:        // Contributor: CK
360:        //
361:        // os.name= "Mac OS" "mac os"
362:        // os.arch= "PowerPC" "powerpc"
363:        // os.version= "7.5.1" "7.5.1"
364:        // java.vendor= "Metrowerks Corp." "metrowerks corp."
365:        // java.class.version= "45.3" "45.3"
366:        // java.version= "1.1.3" "1.1.3"
367:        // file.separator= "/" "/"
368:        // path.separator= ";" ";"
369:        // line.separator= "0xd" "0xd"
370:        //
371:        //
372:        // ------------------------------------------------------
373:        // OS: MacOS 7.5.1
374:        // Processor: PowerMac
375:        // VM: MRJ 1.0.2, 1.5, 2.0d2 (values are the same for all three)
376:        // Notes:
377:        // Contributor: CK
378:        //
379:        // os.name= "Mac OS" "mac os"
380:        // os.arch= "PowerPC" "powerpc"
381:        // os.version= "7.5.1" "7.5.1"
382:        // java.vendor= "Apple Computer, Inc." "apple computer, inc."
383:        // java.class.version= "45.3" "45.3"
384:        // java.version= "1.0.2" "1.0.2"
385:        // file.separator= "/" "/"
386:        // path.separator= ":" ":"
387:        // line.separator= "0xd" "0xd"
388:        //
389:        //
390:        // ------------------------------------------------------
391:        // OS: MacOS 8.1
392:        // Processor: PowerPC 604e
393:        // VM: MRJ 2.0
394:        // Notes:
395:        // Contributor: BG
396:        //
397:        // os.name= "Mac OS" "mac os"
398:        // os.arch= "PowerPC" "powerpc"
399:        // os.version= "8.1" "8.1"
400:        // java.vendor= "Apple Computer, Inc." "apple computer, inc."
401:        // java.class.version= "45.3" "45.3"
402:        // java.version= "1.1.3" "1.1.3"
403:        // file.separator= "/" "/"
404:        // path.separator= ":" ":"
405:        // line.separator= "0xd" "0xd"
406:        //
407:        //
408:        // ------------------------------------------------------
409:        // OS: MacOS 8.0
410:        // Processor: PowerPC 603e
411:        // VM: MRJ 2.1 ea1
412:        // Notes:
413:        // Contributor: MJ
414:        //
415:        // os.name= "Mac OS" "mac os"
416:        // os.arch= "PowerPC" "powerpc"
417:        // os.version= "8" "8"
418:        // java.vendor= "Apple Computer, Inc." "apple computer, inc."
419:        // java.class.version= "45.3" "45.3"
420:        // java.version= "1.1.5" "1.1.5"
421:        // file.separator= "/" "/"
422:        // path.separator= ":" ":"
423:        // line.separator= "0xd" "0xd"
424:        //
425:        //
426:        // ------------------------------------------------------
427:        // OS: MacOS version 8.1
428:        // Processor: PowerPC 750 (?)
429:        // VM: Netscape Navigator
430:        // Notes: Obtained in Netscape Navigator 4.05-98085.
431:        // Contributor: DG
432:        //
433:        // os.name= "Mac OS" "mac os"
434:        // os.arch= "PowerPC" "powerpc"
435:        // os.version= "7.5" "7.5"
436:        // java.vendor= "Netscape Communications Corporation""netscape communications corporation"
437:        // java.class.version= "45.3" "45.3"
438:        // java.version= "1.1.2" "1.1.2"
439:        // file.separator= "/" "/"
440:        // path.separator= ":" ":"
441:        // line.separator= "0xa" "0xa"
442:        //
443:        //
444:        // ------------------------------------------------------
445:        // OS: MacOS version 8.1
446:        // Processor: PowerPC 750 (?)
447:        // VM: Microsoft Virtual Machine
448:        // Notes: Obtained in Internet Explorer 4.01 (PowerPC) with "Java virtual Machine"
449:        // pop-up preference set to "Microsoft Virtual Machine".
450:        // Contributor: DG
451:        //
452:        // os.name= "MacOS" "macos"
453:        // os.arch= "PowerPC" "powerpc"
454:        // os.version= "8.1.0" "8.1.0"
455:        // java.vendor= "Microsoft Corp." "microsoft corp."
456:        // java.class.version= "45.3" "45.3"
457:        // java.version= "1.1.4" "1.1.4"
458:        // file.separator= "/" "/"
459:        // path.separator= ";" ";"
460:        // line.separator= "0xd" "0xd"
461:        //
462:        //
463:        // ------------------------------------------------------
464:        // OS: MacOS version 8.1
465:        // Processor: PowerPC 750 (?)
466:        // VM: Apple MRJ
467:        // Notes: Obtained in Internet Explorer 4.01 (PowerPC) with "Java virtual Machine"
468:        // pop-up preference set to "Apple MRJ".
469:        // Contributor: DG
470:        //
471:        // os.name= "Mac OS" "mac os"
472:        // os.arch= "PowerPC" "powerpc"
473:        // os.version= "8.1" "8.1"
474:        // java.vendor= "Apple Computer, Inc." "apple computer, inc."
475:        // java.class.version= "45.3" "45.3"
476:        // java.version= "1.1.3" "1.1.3"
477:        // file.separator= "/" "/"
478:        // path.separator= ":" ":"
479:        // line.separator= "0xd" "0xd"
480:        //
481:        //
482:        //
483:        //
484:        // --------------------------------------------------------------------------------
485:        //
486:        //
487:        // Linux VMs
488:        //
489:        //
490:        //
491:        // ------------------------------------------------------
492:        // OS: Redhat Linux 5.0
493:        // Processor: Pentium
494:        // VM: blackdown.org JDK1.1.6 v2
495:        // Notes:
496:        // Contributor: CK
497:        //
498:        // os.name= "Linux" "linux"
499:        // os.arch= "x86" "x86"
500:        // os.version= "2.0.31" "2.0.31"
501:        // java.vendor= "Sun Microsystems Inc., ported by Randy Chapman and Steve Byrne""sun microsystems inc., ported by randy
502:        // chapman and steve byrne"
503:        // java.class.version= "45.3" "45.3"
504:        // java.version= "1.1.6" "1.1.6"
505:        // file.separator= "/" "/"
506:        // path.separator= ":" ":"
507:        // line.separator= "0xa" "0xa"
508:        //
509:        //
510:        //
511:        //
512:        //
513:        //
514:        //
515:        //
516:        //
517:        //
518:        // --------------------------------------------------------------------------------
519:        //
520:        //
521:        // Solaris
522:        //
523:        //
524:        //
525:        // ------------------------------------------------------
526:        // OS: Solaris 2.5.1
527:        // Processor: Ultra1
528:        // VM: Sun JDK 1.1.6
529:        // Notes:
530:        // Contributor: MJ
531:        //
532:        // os.name= "Solaris" "solaris"
533:        // os.arch= "sparc" "sparc"
534:        // os.version= "2.x" "2.x"
535:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
536:        // java.class.version= "45.3" "45.3"
537:        // java.version= "1.1.6" "1.1.6"
538:        // file.separator= "/" "/"
539:        // path.separator= ":" ":"
540:        // line.separator= "0xa" "0xa"
541:        //
542:        //
543:        // ------------------------------------------------------
544:        // OS: Solaris 2.5.1
545:        // Processor: Sparc Ultra 1
546:        // VM: Sun JDK 1.1.6
547:        // Notes:
548:        // Contributor: JH
549:        //
550:        // os.name= "Solaris" "solaris"
551:        // os.arch= "sparc" "sparc"
552:        // os.version= "2.x" "2.x"
553:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
554:        // java.class.version= "45.3" "45.3"
555:        // java.version= "1.1.6" "1.1.6"
556:        // file.separator= "/" "/"
557:        // path.separator= ":" ":"
558:        // line.separator= "0xa" "0xa"
559:        //
560:        //
561:        // ------------------------------------------------------
562:        // OS: Solaris
563:        // Processor: sparc
564:        // VM: jdk1.1.6
565:        // Notes:
566:        // Contributor: AB
567:        //
568:        // os.name= "Solaris" "solaris"
569:        // os.arch= "sparc" "sparc"
570:        // os.version= "2.x" "2.x"
571:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
572:        // java.class.version= "45.3" "45.3"
573:        // java.version= "1.1.6" "1.1.6"
574:        // file.separator= "/" "/"
575:        // path.separator= ":" ":"
576:        // line.separator= "0xa" "0xa"
577:        //
578:        //
579:        // ------------------------------------------------------
580:        // OS: SunOS 5.6 (Solaris 2.6)
581:        // Processor: sparc
582:        // VM: JDK 1.1.3
583:        // Notes:
584:        // Contributor: NB
585:        //
586:        // os.name= "Solaris" "solaris"
587:        // os.arch= "sparc" "sparc"
588:        // os.version= "2.x" "2.x"
589:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
590:        // java.class.version= "45.3" "45.3"
591:        // java.version= "1.1.3" "1.1.3"
592:        // file.separator= "/" "/"
593:        // path.separator= ":" ":"
594:        // line.separator= "0xa" "0xa"
595:        //
596:        //
597:        // ------------------------------------------------------
598:        // On my Sun with JDK 1.1.6 I get -
599:        // Contributor: CA
600:        //
601:        // osName=Solaris
602:        // osArch=sparc
603:        // osVersion=2.x
604:        // vendor=Sun Microsystems Inc.
605:        // APIVersion=45.3
606:        // interpreterVersion=1.1.6
607:        //
608:        //
609:        // ------------------------------------------------------
610:        // OS: Solaris 2.5.1
611:        // Processor: UltraSparc
612:        // VM: Javasoft JDK 1.0.2
613:        // Notes:
614:        // Contributor: CA
615:        //
616:        // os.name= "Solaris" "solaris"
617:        // os.arch= "sparc" "sparc"
618:        // os.version= "2.x" "2.x"
619:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
620:        // java.class.version= "45.3" "45.3"
621:        // java.version= "1.0.2" "1.0.2"
622:        // file.separator= "/" "/"
623:        // path.separator= ":" ":"
624:        // line.separator= "0xa" "0xa"
625:        //
626:        //
627:        //
628:        //
629:        //
630:        //
631:        //
632:        //
633:        // --------------------------------------------------------------------------------
634:        //
635:        //
636:        // OS/2
637:        //
638:        //
639:        //
640:        // ------------------------------------------------------
641:        // OS: OS/2
642:        // Processor: Pentium
643:        // VM: OS/2 JDK 1.1.6
644:        // Notes: JDK 1.1.6 IBM build o116-19980728 (JIT: javax), OS/2 Warp 4, FP7
645:        // Contributor: SP
646:        //
647:        // os.name= "OS/2" "os/2"
648:        // os.arch= "x86" "x86"
649:        // os.version= "20.40" "20.40"
650:        // java.vendor= "IBM Corporation" "ibm corporation"
651:        // java.class.version= "45.3" "45.3"
652:        // java.version= "1.1.6" "1.1.6"
653:        // file.separator= "\" "\"
654:        // path.separator= ";" ";"
655:        // line.separator= "0xd,0xa" "0xd,0xa"
656:        //
657:        //
658:        //
659:        //
660:        //
661:        //
662:        //
663:        //
664:        //
665:        //
666:        //
667:        //
668:        // --------------------------------------------------------------------------------
669:        //
670:        //
671:        // Other Unix Systems
672:        //
673:        //
674:        //
675:        // ------------------------------------------------------
676:        // OS: MPE/iX 5.5 (PowerPatch 3)
677:        // Processor: HP 3000/968 (PA-RISC)
678:        // VM: (unknown - HP provided - JDK 1.1.5)
679:        // Notes:
680:        // Contributor: SS
681:        //
682:        // os.name= "MPE/iX" "mpe/ix"
683:        // os.arch= "PA-RISC" "pa-risc"
684:        // os.version= "C.55.00" "c.55.00"
685:        // java.vendor= "HP CSY (freeware)." "hp csy (freeware)."
686:        // java.class.version= "45.3" "45.3"
687:        // java.version= "JDK 1.1.5" "jdk 1.1.5"
688:        // file.separator= "/" "/"
689:        // path.separator= ":" ":"
690:        // line.separator= "0xa" "0xa"
691:        //
692:        //
693:        // ------------------------------------------------------
694:        // here are the results for the latest HP-UX JDK (HP-UX 10.20):
695:        // AS told me (CK) that for HP-UX java.version will always have the same general format;
696:        // the letter ( "C" in the sample ) might change, and there may or may
697:        // not be a date after the version number.
698:        // Contributor: AS
699:        //
700:        // os.name= "HP-UX" "hp-ux"
701:        // os.arch= "PA-RISC" "pa-risc"
702:        // os.version= "B.10.20" "b.10.20"
703:        // java.vendor= "Hewlett Packard Co." "hewlett packard co."
704:        // java.class.version= "45.3" "45.3"
705:        // java.version= "HP-UX Java C.01.15.03 07/07/98""hp-ux java c.01.15.03 07/07/98"
706:        // file.separator= "/" "/"
707:        // path.separator= ":" ":"
708:        // line.separator= "0xa" "0xa"
709:        //
710:        //
711:        // ------------------------------------------------------
712:        // OS: HP-UX
713:        // Processor: PA-RISC
714:        // VM: HP-UX Java C.01.15.01
715:        // Notes: (see the notes in the previous entry)
716:        // Contributor: NB
717:        //
718:        // os.name= "HP-UX" "hp-ux"
719:        // os.arch= "PA-RISC" "pa-risc"
720:        // os.version= "B.10.20" "b.10.20"
721:        // java.vendor= "Hewlett Packard Co." "hewlett packard co."
722:        // java.class.version= "45.3" "45.3"
723:        // java.version= "HP-UX Java C.01.15.01" "hp-ux java c.01.15.01"
724:        // file.separator= "/" "/"
725:        // path.separator= ":" ":"
726:        // line.separator= "0xa" "0xa"
727:        //
728:        //
729:        // ------------------------------------------------------
730:        // OS: AIX 4.3
731:        // Processor: Power
732:        // VM: JDK 1.1.2
733:        // Notes:
734:        // Contributor: NB
735:        //
736:        // os.name= "AIX" "aix"
737:        // os.arch= "Power" "power"
738:        // os.version= "4.3" "4.3"
739:        // java.vendor= "IBM Corporation" "ibm corporation"
740:        // java.class.version= "45.3" "45.3"
741:        // java.version= "1.1.2" "1.1.2"
742:        // file.separator= "/" "/"
743:        // path.separator= ":" ":"
744:        // line.separator= "0xa" "0xa"
745:        //
746:        //
747:        // ------------------------------------------------------
748:        // Contributor: RG
749:        // My AIX 4.1.5 box with Java 1.1.4 reports:
750:        //
751:        // osName = AIX
752:        // osArch = POWER_RS
753:        // osVersion = 4.1
754:        // vendor = IBM Corporation
755:        // APIVersion = 45.3
756:        // interpeterVersion = 1.1.4
757:        //
758:        //
759:        // ------------------------------------------------------
760:        // OS: FreeBSD 2.2.2
761:        // Processor: Intel Pentium
762:        // VM: FreeBSD port of JDK1.0.2 (Jeff Hsu?)
763:        // Notes: This is actually for FreeBSD with the JDK 1.0.2. It probably says Solaris
764:        // since it was a really early port.
765:        // Contributor: CA
766:        //
767:        // os.name= "Solaris" "solaris"
768:        // os.arch= "sparc" "sparc"
769:        // os.version= "2.x" "2.x"
770:        // java.vendor= "Sun Microsystems Inc." "sun microsystems inc."
771:        // java.class.version= "45.3" "45.3"
772:        // java.version= "hsu:11/21/21-22:43" "hsu:11/21/21-22:43"
773:        // file.separator= "/" "/"
774:        // path.separator= ":" ":"
775:        // line.separator= "0xa" "0xa"
776:        //
777:        //
778:        // ------------------------------------------------------
779:        // OS: FreeBSD 2.2.2
780:        // Processor: Intel Pentium
781:        // VM: JDK1.1.6 FreeBSD port
782:        // Notes:
783:        // Contributor: CA
784:        //
785:        // os.name= "FreeBSD" "freebsd"
786:        // os.arch= "x86" "x86"
787:        // os.version= "2.2.2-RELEASE" "2.2.2-release"
788:        // java.vendor= "Sun Microsystems Inc., port by java-port@FreeBSD.org""sun microsystems inc., port by
789:        // java-port@freebsd.org"
790:        // java.class.version= "45.3" "45.3"
791:        // java.version= "1.1.6" "1.1.6"
792:        // file.separator= "/" "/"
793:        // path.separator= ":" ":"
794:        // line.separator= "0xa" "0xa"
795:        //
796:        //
797:        // ------------------------------------------------------
798:        // OS: IRIX 6.3
799:        // Processor: MIPS R10000
800:        // VM: JDK 1.1.6
801:        // Notes:
802:        // Contributor: YA
803:        //
804:        // os.name= "Irix" "irix"
805:        // os.arch= "mips" "mips"
806:        // os.version= "6.3" "6.3"
807:        // java.vendor= "Silicon Graphics Inc." "silicon graphics inc."
808:        // java.class.version= "45.3" "45.3"
809:        // java.version= "3.1.1 (Sun 1.1.6)" "3.1.1 (sun 1.1.6)"
810:        // file.separator= "/" "/"
811:        // path.separator= ":" ":"
812:        // line.separator= "0xa" "0xa"
813:        //
814:        //
815:        // ------------------------------------------------------
816:        // OS: DIGITAL UNIX 4.0
817:        // Processor: ALPHA
818:        // VM: JDK 1.1.5
819:        // Notes:
820:        // Contributor: MK
821:        //
822:        // os.name= "Digital Unix" "digital unix"
823:        // os.arch= "alpha" "alpha"
824:        // os.version= "4.0" "4.0"
825:        // java.vendor= "Digital Equipment Corp." "digital equipment corp."
826:        // java.class.version= "45.3" "45.3"
827:        // java.version= "1.1.5" "1.1.5"
828:        // file.separator= "/" "/"
829:        // path.separator= ":" ":"
830:        // line.separator= "0xa" "0xa"
831:        //
832:        //
833:        //
834:        //
835:        //
836:        //
837:        // --------------------------------------------------------------------------------
838:        //
839:        //
840:        // Other Platforms
841:        //
842:        //
843:        //
844:        // ------------------------------------------------------
845:        // OS: NetWare 4.11
846:        // Processor: Pentium 200
847:        // VM: Novell JVM for NetWare 1.1.5
848:        // Notes:
849:        // Contributor: FJ
850:        //
851:        // os.name= "NetWare 4.11" "netware 4.11"
852:        // os.arch= "x86" "x86"
853:        // os.version= "4.11" "4.11"
854:        // java.vendor= "Novell Inc." "novell inc."
855:        // java.class.version= "45.3" "45.3"
856:        // java.version= "1.1.5 " "1.1.5 "
857:        // file.separator= "\" "\"
858:        // path.separator= ";" ";"
859:        // line.separator= "0xd,0xa" "0xd,0xa"
860:        //
861:        //
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.