Source Code Cross Referenced for Vm.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
003:         * notice. All rights reserved.
004:         */package com.tc.util.runtime;
005:
006:        /**
007:         * Utility class for understanding the current JVM version. Access the VM version information by looking at
008:         * {@link #VERSION} directly or calling the static helper methods.
009:         */
010:        public class Vm {
011:
012:            /**
013:             * Version info is parsed from system properties and stored here.
014:             */
015:            public static final VmVersion VERSION;
016:            static {
017:                try {
018:                    VERSION = new VmVersion(System.getProperties());
019:                } catch (UnknownJvmVersionException mve) {
020:                    throw new RuntimeException(mve);
021:                } catch (UnknownRuntimeVersionException mve) {
022:                    throw new RuntimeException(mve);
023:                }
024:            }
025:
026:            private Vm() {
027:                // utility class
028:            }
029:
030:            /**
031:             * Get mega version (ie 1 in 1.2.3)
032:             *
033:             * @return Mega version
034:             */
035:            public static int getMegaVersion() {
036:                return VERSION.getMegaVersion();
037:            }
038:
039:            /**
040:             * Get major version (ie 2 in 1.2.3)
041:             *
042:             * @return Major version
043:             */
044:            public static int getMajorVersion() {
045:                return VERSION.getMajorVersion();
046:            }
047:
048:            /**
049:             * Get minor version (ie 3 in 1.2.3)
050:             *
051:             * @return Minor version
052:             */
053:            public static int getMinorVersion() {
054:                return VERSION.getMinorVersion();
055:            }
056:
057:            /**
058:             * Get patch level (ie 12 in 1.4.2_12)
059:             *
060:             * @return Patch level
061:             */
062:            public static String getPatchLevel() {
063:                return VERSION.getPatchLevel();
064:            }
065:
066:            /**
067:             * True if mega/major is 1.4
068:             *
069:             * @return True if 1.4
070:             */
071:            public static boolean isJDK14() {
072:                return VERSION.isJDK14();
073:            }
074:
075:            /**
076:             * True if mega/major is 1.5
077:             *
078:             * @return True if 1.5
079:             */
080:            public static boolean isJDK15() {
081:                return VERSION.isJDK15();
082:            }
083:
084:            /**
085:             * True if mega/major is 1.6
086:             *
087:             * @return True if 1.6
088:             */
089:            public static boolean isJDK16() {
090:                return VERSION.isJDK16();
091:            }
092:
093:            /**
094:             * True if mega/major is 1.7
095:             *
096:             * @return True if 1.7
097:             */
098:            public static boolean isJDK17() {
099:                return VERSION.isJDK17();
100:            }
101:
102:            /**
103:             * True if JDK is 1.5+
104:             *
105:             * @return True if JDK 1.5/1.6/1.7
106:             */
107:            public static boolean isJDK15Compliant() {
108:                return VERSION.getMajorVersion() >= 5;
109:            }
110:
111:            /**
112:             * True if JDK is 1.6+
113:             *
114:             * @return True if JDK 1.6/1.7
115:             */
116:            public static boolean isJDK16Compliant() {
117:                return VERSION.getMajorVersion() >= 6;
118:            }
119:
120:            /**
121:             * True if IBM JDK
122:             *
123:             * @return True if IBM JDK
124:             */
125:            public static boolean isIBM() {
126:                if (VERSION == null) {
127:                    // Our instrumentation for java.lang.reflect.Field can end up calling here while in <clinit> for
128:                    // this class -- this avoids the NPE
129:                    return VmVersion.this VMisIBM();
130:                }
131:                return VERSION.isIBM();
132:            }
133:
134:            /**
135:             * True if JRockit
136:             *
137:             * @return True if BEA Jrockit VM
138:             */
139:            public static boolean isJRockit() {
140:                return VERSION.isJRockit();
141:            }
142:
143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.