1698 */
1699 public static void runFinalization() {
1700 Runtime.getRuntime().runFinalization();
1701 }
1702
1703 /**
1704 * Enable or disable finalization on exit; doing so specifies that the
1705 * finalizers of all objects that have finalizers that have not yet been
1706 * automatically invoked are to be run before the Java runtime exits.
1707 * By default, finalization on exit is disabled.
1708 *
1709 * <p>If there is a security manager,
1710 * its <code>checkExit</code> method is first called
1711 * with 0 as its argument to ensure the exit is allowed.
1712 * This could result in a SecurityException.
1713 *
1714 * @deprecated This method is inherently unsafe. It may result in
1715 * finalizers being called on live objects while other threads are
1716 * concurrently manipulating those objects, resulting in erratic
1717 * behavior or deadlock.
1718 * @param value indicating enabling or disabling of finalization
1719 * @throws SecurityException
1720 * if a security manager exists and its <code>checkExit</code>
1721 * method doesn't allow the exit.
1722 *
1723 * @see java.lang.Runtime#exit(int)
1724 * @see java.lang.Runtime#gc()
1725 * @see java.lang.SecurityManager#checkExit(int)
1726 * @since 1.1
1727 */
1728 @Deprecated
1729 public static void runFinalizersOnExit(boolean value) {
1730 Runtime.runFinalizersOnExit(value);
1731 }
1732
1733 /**
1734 * Loads the native library specified by the filename argument. The filename
1735 * argument must be an absolute path name.
1736 *
1737 * If the filename argument, when stripped of any platform-specific library
1738 * prefix, path, and file extension, indicates a library whose name is,
1739 * for example, L, and a native library called L is statically linked
1740 * with the VM, then the JNI_OnLoad_L function exported by the library
1741 * is invoked rather than attempting to load a dynamic library.
1742 * A filename matching the argument does not have to exist in the
1743 * file system.
1744 * See the JNI Specification for more details.
1745 *
1746 * Otherwise, the filename argument is mapped to a native library image in
1747 * an implementation-dependent manner.
1748 *
|
1698 */
1699 public static void runFinalization() {
1700 Runtime.getRuntime().runFinalization();
1701 }
1702
1703 /**
1704 * Enable or disable finalization on exit; doing so specifies that the
1705 * finalizers of all objects that have finalizers that have not yet been
1706 * automatically invoked are to be run before the Java runtime exits.
1707 * By default, finalization on exit is disabled.
1708 *
1709 * <p>If there is a security manager,
1710 * its <code>checkExit</code> method is first called
1711 * with 0 as its argument to ensure the exit is allowed.
1712 * This could result in a SecurityException.
1713 *
1714 * @deprecated This method is inherently unsafe. It may result in
1715 * finalizers being called on live objects while other threads are
1716 * concurrently manipulating those objects, resulting in erratic
1717 * behavior or deadlock.
1718 * This method is subject to removal in a future version of Java SE.
1719 * @param value indicating enabling or disabling of finalization
1720 * @throws SecurityException
1721 * if a security manager exists and its <code>checkExit</code>
1722 * method doesn't allow the exit.
1723 *
1724 * @see java.lang.Runtime#exit(int)
1725 * @see java.lang.Runtime#gc()
1726 * @see java.lang.SecurityManager#checkExit(int)
1727 * @since 1.1
1728 */
1729 @Deprecated(since="1.2", forRemoval=true)
1730 public static void runFinalizersOnExit(boolean value) {
1731 Runtime.runFinalizersOnExit(value);
1732 }
1733
1734 /**
1735 * Loads the native library specified by the filename argument. The filename
1736 * argument must be an absolute path name.
1737 *
1738 * If the filename argument, when stripped of any platform-specific library
1739 * prefix, path, and file extension, indicates a library whose name is,
1740 * for example, L, and a native library called L is statically linked
1741 * with the VM, then the JNI_OnLoad_L function exported by the library
1742 * is invoked rather than attempting to load a dynamic library.
1743 * A filename matching the argument does not have to exist in the
1744 * file system.
1745 * See the JNI Specification for more details.
1746 *
1747 * Otherwise, the filename argument is mapped to a native library image in
1748 * an implementation-dependent manner.
1749 *
|