java.hpp revision 3847
0N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// Register function to be called by before_exit 0N/A// Execute code before all handles are released and thread is killed; prologue to vm_exit 0N/A// Forced VM exit (i.e, internal error or JVM_Exit) 0N/A// Wrapper for ::exit() 0N/A// Shutdown the VM but do not exit the process 0N/A// Shutdown the VM and abort the process 0N/A// Trigger any necessary notification of the VM being shutdown 0N/A// VM exit if error occurs during initialization of VM 0N/A * Discovering the JDK_Version during initialization is tricky when the 0N/A * running JDK is less than JDK6. For JDK6 and greater, a "GetVersion" 0N/A * function exists in libjava.so and we simply call it during the 0N/A * 'initialize()' call to find the version. For JDKs with version < 6, no 0N/A * such call exists and we have to probe the JDK in order to determine 0N/A * the exact version. This probing cannot happen during late in 0N/A * the VM initialization process so there's a period of time during 0N/A * initialization when we don't know anything about the JDK version other than 0N/A * that it less than version 6. This is the "partially initialized" time, 0N/A * when we can answer only certain version queries (such as, is the JDK 0N/A * version greater than 5? Answer: no). Once the JDK probing occurs, we 0N/A * know the version and are considered fully initialized. 0N/A // In this class, we promote the minor version of release to be the 0N/A // major version for releases >= 5 in anticipation of the JDK doing the 0N/A // same thing. For example, we represent "1.5.0" as major version 5 (we 0N/A // drop the leading 1 and use 5 as the 'major'). 0N/A // If partially initialized, the above fields are invalid and we know 0N/A // that we're less than major version 6. 0N/A // initializes or partially initializes the _current static field 0N/A // Completes initialization for a pre-JDK6 version. 0N/A // Returns true if the the current version has only been partially initialized // Returns the current running JDK version // Factory methods for convenience // For compatibility wrt pre-4965777 JDK's // Performs a full ordering comparison using all fields (update, build, etc.) * Performs comparison using only the major version, returning negative * if the major version of 'this' is less than the parameter, 0 if it is * equal, and a positive value if it is greater. assert(
false,
"Can't make this comparison during init time");
return -
1;
// conservative // Convenience methods for queries on the current major/minor version #
endif // SHARE_VM_RUNTIME_JAVA_HPP