Deprecated API
Contents
-
ElementDescriptionThis class has been deprecated.This class has been deprecated.This field is unused.This field is unused.This field is unused.This field is unused; to get the component with focus use the getComponentWithFocus method.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.The
finalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.It is rarely appropriate to use this constructor. The static factoryBoolean.valueOf(boolean)
is generally a better choice, as it is likely to yield significantly better space and time performance. Also consider using the final fieldsBoolean.TRUE
andBoolean.FALSE
if possible.It is rarely appropriate to use this constructor. UseBoolean.parseBoolean(String)
to convert a string to aboolean
primitive, or useBoolean.valueOf(String)
to convert a string to aBoolean
object.It is rarely appropriate to use this constructor. The static factoryByte.valueOf(byte)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseByte.parseByte(String)
to convert a string to abyte
primitive, or useByte.valueOf(String)
to convert a string to aByte
object.It is rarely appropriate to use this constructor. The static factoryCharacter.valueOf(char)
is generally a better choice, as it is likely to yield significantly better space and time performance.JIT compilers and their technologies vary too widely to be controlled effectively by a standardized interface. As such, many JIT compiler implementations ignore this interface, and are instead controllable by implementation-specific mechanisms such as command-line options. This class is subject to removal in a future version of Java SE.It is rarely appropriate to use this constructor. The static factoryDouble.valueOf(double)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseDouble.parseDouble(String)
to convert a string to adouble
primitive, or useDouble.valueOf(String)
to convert a string to aDouble
object.It is rarely appropriate to use this constructor. Instead, use the static factory methodFloat.valueOf(float)
method as follows:Float.valueOf((float)value)
.It is rarely appropriate to use this constructor. The static factoryFloat.valueOf(float)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseFloat.parseFloat(String)
to convert a string to afloat
primitive, or useFloat.valueOf(String)
to convert a string to aFloat
object.It is rarely appropriate to use this constructor. The static factoryInteger.valueOf(int)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseInteger.parseInt(String)
to convert a string to aint
primitive, or useInteger.valueOf(String)
to convert a string to anInteger
object.It is rarely appropriate to use this constructor. The static factoryLong.valueOf(long)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseLong.parseLong(String)
to convert a string to along
primitive, or useLong.valueOf(String)
to convert a string to aLong
object.It is rarely appropriate to use this constructor. The static factoryShort.valueOf(short)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseShort.parseShort(String)
to convert a string to ashort
primitive, or useShort.valueOf(String)
to convert a string to aShort
object.This method was originally designed to count the number of stack frames but the results were never well-defined and it depended on thread-suspension. This method is subject to removal in a future version of Java SE.This method exists solely for use withThread.suspend()
, which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to callingresume
, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.The definition of this call depends onThreadGroup.suspend()
, which is deprecated. Further, the behavior of this call was never specified.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group will be removed in a future release.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group, and the concept of daemon thread group, will be removed in a future release.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group will be removed in a future release.This method is used solely in conjunction withThread.suspend
andThreadGroup.suspend
, both of which have been deprecated, as they are inherently deadlock-prone. SeeThread.suspend()
for details.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group, and the concept of daemon thread group, will be removed in a future release.This method is inherently unsafe. SeeThread.stop()
for details.This method is inherently deadlock-prone. SeeThread.suspend()
for details.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.cert.Certificate
and related classes.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.TheHandshakeCompletedEvent.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.TheSSLSession.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.
-
PackageDescriptionThe RMI Activation mechanism has been deprecated and may be removed from a future version of the Java Platform. All of the classes and interfaces in this package have been terminally deprecated. The
rmid
tool has also been terminally deprecated. There is no replacement for the RMI Activation mechanism in the Java Platform. Users of RMI Activation are advised to migrate their applications to other technologies.
-
InterfaceDescriptionThis class has been deprecated.The Applet API is deprecated, no replacement.The Applet API is deprecated, no replacement.The Applet API is deprecated, no replacement.The Applet API is deprecated. See the java.applet package documentation for further information.See the
java.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.no replacementno replacementno replacement.No replacement. This interface is unused and is obsolete.no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.cert.Certificate
and related classes.LoggingMXBean
is no longer aplatform MXBean
and is replaced withPlatformLoggingMXBean
. It will not register in the platformMBeanServer
. UseManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)
instead.This interface has been deprecated. See theObservable
class for further information.This interface has been replaced by the SAX2Attributes
interface, which includes Namespace support.This interface has been replaced by the SAX2ContentHandler
interface, which includes Namespace support.This interface has been replaced by the SAX2XMLReader
interface, which includes Namespace support.
-
ClassDescriptionThis class has been deprecated.The Applet API is deprecated, no replacement.It is recommended that
AWTEvent
and its subclasses be used insteadThis class incorrectly assumes that bytes adequately represent characters. As of JDK 1.1, the preferred way to operate on character streams is via the new character-stream classes, which include a class for counting line numbers.This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via theStringReader
class.JIT compilers and their technologies vary too widely to be controlled effectively by a standardized interface. As such, many JIT compiler implementations ignore this interface, and are instead controllable by implementation-specific mechanisms such as command-line options. This class is subject to removal in a future version of Java SE.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.UseSecurityManager
instead.no replacementno replacementStatically generated stubs are deprecated, since stubs are generated dynamically. SeeUnicastRemoteObject
for information about dynamic stub generation.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.This class is deprecated and subject to removal in a future version of Java SE. It has been replaced byjava.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.This class and theObserver
interface have been deprecated. The event model supported byObserver
andObservable
is quite limited, the order of notifications delivered byObservable
is unspecified, and state changes are not in one-for-one correspondence with notifications. For a richer event model, consider using thejava.beans
package. For reliable and ordered messaging among threads, consider using one of the concurrent data structures in thejava.util.concurrent
package. For reactive streams style programming, see theFlow
API.This class is deprecated as of version 1.3 of the Java PlatformUseMBeanServer.getClassLoaderRepository()
instead.UseMBeanServer.getClassLoaderRepository()
instead.This transport is no longer supported.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.The Applet API is deprecated, no replacement.This class is no longer used or needed.java.awt.Component.AccessibleAWTComponent
provides the same functionality and it is handled inComponent
.As of Java 2 platform v1.4.As of JDK version 9. Obsolete class.As of JDK version 9. Obsolete class.A table cell can now be any View implementation.Java SE 9 added standard methods to set/get socket options, and retrieve the per-Socket supported options effectively rendering this API redundant. Please refer to the corresponding socket's class for the equivalent method to set/get a socket option or retrieve available socket options.This class works with the deprecatedDocumentHandler
interface. It has been replaced by the SAX2DefaultHandler
class.This class implements a deprecated interface,AttributeList
; that interface has been replaced byAttributes
, which is implemented in theAttributesImpl
helper class.This class works with the deprecatedParser
interface.It is recommended to useSAXParserFactory
instead.
-
ExceptionsDescriptionThis exception is no longer thrownThis exception is no longer thrownSee the
java.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.See thejava.rmi.activation
package specification for further information.UseSecurityException
instead. Application code should never directly reference this class, andRMISecurityManager
no longer throws this subclass ofjava.lang.SecurityException
.no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.no replacement. Skeletons are no longer required for remote method calls in the Java 2 platform v1.2 and greater.This class is obsolete. UseExportException
instead.no replacementUse the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.Use the classes injava.security.cert
instead.
-
FieldDescriptionThis field is unused.This field is unused.This field is unused.This field is unused; to get the component with focus use the getComponentWithFocus method.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.This field is unused.As of JDK version 1.7, the
Cursor.getPredefinedCursor(int)
method should be used instead.as of 1.3. UseDataFlavor.getReaderForText(java.awt.datatransfer.Transferable)
instead ofTransferable.getTransferData(DataFlavor.plainTextFlavor)
.It is recommended that ALT_GRAPH_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadIt is recommended that ALT_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadIt is recommended that BUTTON1_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadIt is recommended that BUTTON2_DOWN_MASK andInputEvent.getModifiersEx()
be used instead. Note that BUTTON2_MASK has the same value as ALT_MASK.It is recommended that BUTTON3_DOWN_MASK andInputEvent.getModifiersEx()
be used instead. Note that BUTTON3_MASK has the same value as META_MASK.It is recommended that CTRL_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadIt is recommended that META_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadIt is recommended that SHIFT_DOWN_MASK andInputEvent.getModifiersEx()
be used insteadreplaced byCursor.CROSSHAIR_CURSOR
.replaced byCursor.DEFAULT_CURSOR
.replaced byCursor.E_RESIZE_CURSOR
.replaced byCursor.HAND_CURSOR
.replaced byCursor.MOVE_CURSOR
.replaced byCursor.N_RESIZE_CURSOR
.replaced byCursor.NE_RESIZE_CURSOR
.replaced byCursor.NW_RESIZE_CURSOR
.replaced byCursor.S_RESIZE_CURSOR
.replaced byCursor.SE_RESIZE_CURSOR
.replaced byCursor.SW_RESIZE_CURSOR
.replaced byCursor.TEXT_CURSOR
.replaced byCursor.W_RESIZE_CURSOR
.replaced byCursor.WAIT_CURSOR
.Instead ofSURROGATES_AREA
, useCharacter.UnicodeBlock.HIGH_SURROGATES
,Character.UnicodeBlock.HIGH_PRIVATE_USE_SURROGATES
, andCharacter.UnicodeBlock.LOW_SURROGATES
. These constants match the block definitions of the Unicode Standard. TheCharacter.UnicodeBlock.of(char)
andCharacter.UnicodeBlock.of(int)
methods return the standard constants.UseRoundingMode.CEILING
instead.UseRoundingMode.DOWN
instead.UseRoundingMode.FLOOR
instead.UseRoundingMode.HALF_DOWN
instead.UseRoundingMode.HALF_EVEN
instead.UseRoundingMode.HALF_UP
instead.UseRoundingMode.UNNECESSARY
instead.UseRoundingMode.UP
instead.it is misplaced and shouldn't have existed.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.Extension mechanism is no longer supported.Extension mechanism is no longer supported.Extension mechanism is no longer supported.Initialization of this field is prone to deadlocks. The field must be initialized by the Logger class initialization which may cause deadlocks with the LogManager class initialization. In such cases two class initialization wait for each other to complete. The preferred way to get the global logger object is via the callLogger.getGlobal()
. For compatibility with old JDK versions where theLogger.getGlobal()
is not available use the callLogger.getLogger(Logger.GLOBAL_LOGGER_NAME)
orLogger.getLogger("global")
.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.Instead of using this field, directly create the equivalent array{ ImageInputStream.class }
.Instead of using this field, directly create the equivalent array{ ImageOutputStream.class }
.equivalent toMonitor.alreadyNotifieds
[0].No replacement.UseALLOWED_CLASSNAMES_LIST
instead.An environment property with this name is ignored while constructing an initial context. This constant was originally used as a property name to specify anApplet
to retrieve parameters from, when creating an initial context. Currently any applet properties that need to be passed to an initial context should be copied into the environment hashtable:Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, ((Applet) this).getParameter(Context.INITIAL_CONTEXT_FACTORY)); env.put(Context.PROVIDER_URL, ((Applet) this).getParameter(Context.PROVIDER_URL)); // ... other properties ... Context ctx = new InitialContext(env);
AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.AserialVersionUID
field in an interface is ineffectual. Do not use; no replacement.Because this field is final (it is part of an interface), its value cannot be changed.since 1.8since 1.8As of Java 2 platform v1.3As of 1.3.As of 1.3.As of 1.3.As of 1.3.As of 1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.as of Java 2 platform v1.3As of 1.3, value comes from UIManager UIManager property FormView.resetButtonTextAs of 1.3, value now comes from UIManager property FormView.submitButtonText
-
MethodDescriptionA JVM TI based JDWP back-end will never set this capability to true.A JVM TI based JDWP back-end will never set this capability to true.Use
OperatingSystemMXBean.getFreeMemorySize()
instead of this historically named method.UseOperatingSystemMXBean.getCpuLoad()
instead of this historically named method.UseOperatingSystemMXBean.getTotalMemorySize()
instead of this historically named method.Please useCaseTree.getExpressions()
.replaced byaddLayoutComponent(Component, Object)
.replaced byaddLayoutComponent(Component, Object)
.As of JDK version 1.1, replaced bygetSelectedCheckbox()
.As of JDK version 1.1, replaced bysetSelectedCheckbox(Checkbox)
.As of JDK version 1.1, replaced bygetItemCount()
.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.As of JDK version 1.1, should register this component as ActionListener on component which fires action events.As of JDK version 1.1, replaced bygetBounds()
.As of JDK version 1.1, replaced bydispatchEvent(AWTEvent e)
.As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).As of JDK version 1.1 replaced by processEvent(AWTEvent).As of JDK version 1.1, replaced bysetVisible(boolean)
.As of JDK version 1.1, replaced by contains(int, int).As of 1.4, replaced byisFocusable()
.As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).As of JDK version 1.1, replaced bydoLayout()
.As of JDK version 1.1, replaced by getComponentAt(int, int).As of JDK version 1.1, replaced bygetLocation()
.As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).As of JDK version 1.1, replaced bygetMinimumSize()
.As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).As of JDK version 1.1, replaced bysetLocation(int, int)
.As of JDK version 1.1, replaced by transferFocus().As of JDK version 1.1, replaced by dispatchEvent(AWTEvent).As of JDK version 1.1, replaced bygetPreferredSize()
.As of JDK version 1.1, replaced bysetBounds(int, int, int, int)
.As of JDK version 1.1, replaced bysetSize(int, int)
.As of JDK version 1.1, replaced bysetSize(Dimension)
.As of JDK version 1.1, replaced bysetVisible(boolean)
.As of JDK version 1.1, replaced bysetVisible(boolean)
.As of JDK version 1.1, replaced bygetSize()
.As of J2SE 1.4, useComponentOrientation.getOrientation(java.util.Locale)
.As of JDK version 1.1, replaced by getComponentCount().As of JDK version 1.1, replaced bydispatchEvent(AWTEvent e)
As of JDK version 1.1, replaced bygetInsets()
.As of JDK version 1.1, replaced bydoLayout()
.As of JDK version 1.1, replaced bygetComponentAt(int, int)
.As of JDK version 1.1, replaced bygetMinimumSize()
.As of JDK version 1.1, replaced bygetPreferredSize()
.As inconsistent withhashCode()
contract, useDataFlavor.isMimeTypeEqual(String)
instead.This method is never invoked by this implementation from 1.1 onwardsThis method is never invoked by this implementation from 1.1 onwardsAs of JDK version 1.5, replaced bysetVisible(boolean)
.As of JDK version 1.5, replaced bysetVisible(boolean)
.It is recommended that extended modifier keys andInputEvent.getModifiersEx()
be used insteadIt is recommended that extended modifier keys andInputEvent.getModifiersExText(int)
be used insteadas of JDK1.1.4As of JDK version 1.1.1, replaced bygetMaxDescent()
.As of JDK version 1.1, replaced byComponent.getCursor()
.As of JDK version 1.1, replaced byComponent.setCursor(Cursor)
.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.As of JDK version 1.1, replaced bygetClipBounds()
.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.replaced byconcatenateTransform(AffineTransform)
.replaced bypreConcatenateTransform(AffineTransform)
.replaced byadd(String)
.replaced byadd(String, int)
.As of JDK version 1.1, replaced byisMultipleMode()
.As of JDK version 1.1, replaced byremoveAll()
.As of JDK version 1.1, replaced bygetItemCount()
.replaced byremove(String)
andremove(int)
.As of JDK version 1.1, Not for public use in the future. This method is expected to be retained only as a package private method.As of JDK version 1.1, replaced byisIndexSelected(int)
.As of JDK version 1.1, replaced bygetMinimumSize()
.As of JDK version 1.1, replaced bygetMinimumSize(int)
.As of JDK version 1.1, replaced bygetPreferredSize()
.As of JDK version 1.1, replaced bygetPreferredSize(int)
.As of JDK version 1.1, replaced bysetMultipleMode(boolean)
.As of JDK version 1.1, replaced bygetItemCount()
.As of JDK version 1.1, replaced bygetMenuCount()
.As of JDK version 1.1, replaced bydispatchEvent
.As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced bysetEnabled(boolean)
.As of JDK version 1.1, replaced bygetBounds()
.As of JDK version 1.1, replaced bycontains(int, int)
.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.As of JDK version 1.1, replaced bycontains(int, int)
.As of JDK version 1.1, replaced bysetLocation(int, int)
.As of JDK version 1.1, replaced bysetBounds(int, int, int, int)
.As of JDK version 1.1, replaced bysetSize(int, int)
.As of JDK version 1.1, replaced bygetUnitIncrement()
.As of JDK version 1.1, replaced bygetBlockIncrement()
.As of JDK version 1.1, replaced bygetVisibleAmount()
.As of JDK version 1.1, replaced bysetUnitIncrement(int)
.As of JDK version 1.1, replaced bysetBlockIncrement()
.As of JDK version 1.1, replaced bydoLayout()
.As of JDK version 1.1, replaced byappend(String)
.As of JDK version 1.1, replaced byinsert(String, int)
.As of JDK version 1.1, replaced bygetMinimumSize()
.As of JDK version 1.1, replaced bygetMinimumSize(int, int)
.As of JDK version 1.1, replaced bygetPreferredSize()
.As of JDK version 1.1, replaced bygetPreferredSize(int, int)
.As of JDK version 1.1, replaced byreplaceRange(String, int, int)
.As of JDK version 1.1, replaced bygetMinimumSize()
.As of JDK version 1.1, replaced bygetMinimumSize(int)
.As of JDK version 1.1, replaced bygetPreferredSize()
.As of JDK version 1.1, replaced bygetPreferredSize(int)
.As of JDK version 1.1, replaced bysetEchoChar(char)
.As of JDK version 1.2, replaced by theFont
methodgetLineMetrics
.It is recommended that extended modifier keys andToolkit.getMenuShortcutKeyMaskEx()
be used insteadAs of J2SE 1.4, replaced byComponent.applyComponentOrientation
.As of J2SE 1.4, replaced byComponent.applyComponentOrientation
.As of JDK version 1.5, replaced byWindow.setVisible(boolean)
.As of JDK version 1.1 replaced bydispatchEvent(AWTEvent)
.As of JDK version 1.1, replaced bysetBounds(int, int, int, int)
.As of JDK version 1.5, replaced byWindow.setVisible(boolean)
.It is recommended to useBeans.instantiate(ClassLoader, String, BeanContext)
, because the Applet API is deprecated. See the java.applet package documentation for further information.This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via theByteArrayOutputStream.toString(String charsetName)
orByteArrayOutputStream.toString(Charset charset)
method, which takes an encoding-name or charset argument, or thetoString()
method, which uses the platform's default character encoding.This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via theBufferedReader.readLine()
method. Programs that use theDataInputStream
class to read lines can be converted to use theBufferedReader
class by replacing code of the form:
with:DataInputStream d = new DataInputStream(in);
BufferedReader d = new BufferedReader(new InputStreamReader(in));
This method does not properly convert bytes to characters. see DataInputStream for the details and alternatives.This method does not write the values contained by thisPutField
object in a proper format, and may result in corruption of the serialization stream. The correct way to writePutField
data is by calling theObjectOutputStream.writeFields()
method.Replaced by isJavaIdentifierStart(char).Replaced by isJavaIdentifierPart(char).Replaced by isWhitespace(char).This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. TheConstructor.newInstance
method avoids this problem by wrapping any exception thrown by the constructor in a (checked)InvocationTargetException
.The call
can be replaced byclazz.newInstance()
The latter sequence of calls is inferred to be able to throw the additional exception typesclazz.getDeclaredConstructor().newInstance()
InvocationTargetException
andNoSuchMethodException
. Both of these exception types are subclasses ofReflectiveOperationException
.Replaced bydefineClass(String, byte[], int, int)
If multiple class loaders delegate to each other and define classes with the same package name, and one such loader relies on the lookup behavior ofgetPackage
to return aPackage
from a parent loader, then the properties exposed by thePackage
may not be as expected in the rest of the program. For example, thePackage
will only expose annotations from thepackage-info.class
file defined by the parent loader, even if annotations exist in apackage-info.class
file defined by a child loader. A more robust approach is to use theClassLoader.getDefinedPackage(java.lang.String)
method which returns aPackage
for the specified class loader.This method was originally designed to testPRIVATE
access that implies full privilege access butMODULE
access has since become independent ofPRIVATE
access. It is recommended to callMethodHandles.Lookup.hasFullPrivilegeAccess()
instead.The finalization mechanism is inherently problematic. Finalization can lead to performance issues, deadlocks, and hangs. Errors in finalizers can lead to resource leaks; there is no way to cancel finalization if it is no longer necessary; and no ordering is specified among calls tofinalize
methods of different objects. Furthermore, there are no guarantees regarding the timing of finalization. Thefinalize
method might be called on a finalizable object only after an indefinite delay, if at all. Classes whose instances hold non-heap resources should provide a method to enable explicit release of those resources, and they should also implementAutoCloseable
if appropriate. TheCleaner
andPhantomReference
provide more flexible and efficient ways to release resources when an object becomes unreachable.If multiple class loaders delegate to each other and define classes with the same package name, and one such loader relies on the lookup behavior ofgetPackage
to return aPackage
from a parent loader, then the properties exposed by thePackage
may not be as expected in the rest of the program. For example, thePackage
will only expose annotations from thepackage-info.class
file defined by the parent loader, even if annotations exist in apackage-info.class
file defined by a child loader. A more robust approach is to use theClassLoader.getDefinedPackage(java.lang.String)
method which returns aPackage
for the specified class loader.This method was originally specified to test if a reference object has been cleared and enqueued but was never implemented to do this test. This method could be misused due to the inherent race condition or without an associatedReferenceQueue
. An application relying on this method to release critical resources could cause serious performance issue. An application should useReferenceQueue
to reliably determine what reference objects that have been enqueued orrefersTo(null)
to determine if this reference object has been cleared.This method is deprecated because its name hints that it checks if the reflected object is accessible when it actually indicates if the checks for Java language access control are suppressed. This method may returnfalse
on a reflected object that is accessible to the caller. To test if this reflected object is accessible, it should useAccessibleObject.canAccess(Object)
.Proxy classes generated in a named module are encapsulated and not accessible to code outside its module.Constructor.newInstance
will throwIllegalAccessException
when it is called on an inaccessible proxy class. UseProxy.newProxyInstance(ClassLoader, Class[], InvocationHandler)
to create a proxy instance instead.As of Java SE 10, the first element of a version number is not the major-release number but the feature-release counter, incremented for every time-based release. Use theRuntime.Version.feature()
method in preference to this method. For compatibility, this method returns the value of the feature element.As of Java SE 10, the second element of a version number is not the minor-release number but the interim-release counter, incremented for every interim release. Use theRuntime.Version.interim()
method in preference to this method. For compatibility, this method returns the value of the interim element, or zero if it is absent.As of Java SE 10, the third element of a version number is not the security level but the update-release counter, incremented for every update release. Use theRuntime.Version.update()
method in preference to this method. For compatibility, this method returns the value of the update element, or zero if it is absent.Use #checkPermission(java.security.Permission) insteadThis method does not properly convert characters into bytes. As of JDK 1.1, the preferred way to do this is via theString.getBytes()
method, which uses the platform's default charset.This method was originally designed to count the number of stack frames but the results were never well-defined and it depended on thread-suspension. This method is subject to removal in a future version of Java SE.This method exists solely for use withThread.suspend()
, which has been deprecated because it is deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.This method is inherently unsafe. Stopping a thread with Thread.stop causes it to unlock all of the monitors that it has locked (as a natural consequence of the uncheckedThreadDeath
exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects become visible to other threads, potentially resulting in arbitrary behavior. Many uses ofstop
should be replaced by code that simply modifies some variable to indicate that the target thread should stop running. The target thread should check this variable regularly, and return from its run method in an orderly fashion if the variable indicates that it is to stop running. If the target thread waits for long periods (on a condition variable, for example), theinterrupt
method should be used to interrupt the wait. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.This method has been deprecated, as it is inherently deadlock-prone. If the target thread holds a lock on the monitor protecting a critical system resource when it is suspended, no thread can access this resource until the target thread is resumed. If the thread that would resume the target thread attempts to lock this monitor prior to callingresume
, deadlock results. Such deadlocks typically manifest themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.The definition of this call depends onThreadGroup.suspend()
, which is deprecated. Further, the behavior of this call was never specified.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group will be removed in a future release.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group, and the concept of daemon thread group, will be removed in a future release.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group will be removed in a future release.This method is used solely in conjunction withThread.suspend
andThreadGroup.suspend
, both of which have been deprecated, as they are inherently deadlock-prone. SeeThread.suspend()
for details.The API and mechanism for destroying a ThreadGroup is inherently flawed. The ability to explicitly or automatically destroy a thread group, and the concept of daemon thread group, will be removed in a future release.This method is inherently unsafe. SeeThread.stop()
for details.This method is inherently deadlock-prone. SeeThread.suspend()
for details.The methodBigDecimal.divide(BigDecimal, RoundingMode)
should be used in preference to this legacy method.The methodBigDecimal.divide(BigDecimal, int, RoundingMode)
should be used in preference to this legacy method.The methodBigDecimal.setScale(int, RoundingMode)
should be used in preference to this legacy method.use getTimeToLive instead.use setTimeToLive instead.The network interface may not be uniquely identified by the InetAddress returned. UseMulticastSocket.getNetworkInterface()
instead.use the getTimeToLive method instead, which returns an int instead of a byte.This method does not accept the network interface on which to join the multicast group. UseMulticastSocket.joinGroup(SocketAddress, NetworkInterface)
instead.This method does not accept the network interface on which to leave the multicast group. UseMulticastSocket.leaveGroup(SocketAddress, NetworkInterface)
instead.Use the following code or its equivalent instead: ...... int ttl = mcastSocket.getTimeToLive(); mcastSocket.setTimeToLive(newttl); mcastSocket.send(p); mcastSocket.setTimeToLive(ttl); ......The InetAddress may not uniquely identify the network interface. UseMulticastSocket.setNetworkInterface(NetworkInterface)
instead.UseDatagramSocket.setOption(SocketOption, Object)
withStandardSocketOptions.IP_MULTICAST_LOOP
instead. The loopback mode is enabled by default,MulticastSocket.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, false)
disables it.use the setTimeToLive method instead, which uses int instead of byte as the type for ttl.The instance specific getRequestProperty method should be used after an appropriate instance of URLConnection is obtained.The instance specific setRequestProperty method should be used after an appropriate instance of URLConnection is obtained. Invoking this method will have no effect.The resulting string may vary depending on the platform's default encoding. Instead, use the decode(String,String) method to specify the encoding.The resulting string may vary depending on the platform's default encoding. Instead, use the encode(String,String) method to specify the encoding.Use setURL(URL, String, String, int, String, String, String, String);no replacement. As of the Java 2 platform v1.2, RMI no longer uses theRegistryHandler
to obtain the registry's implementation.no replacement. As of the Java 2 platform v1.2, RMI no longer uses theRegistryHandler
to obtain the registry's stub.no replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacementno replacement1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall
,invoke
, anddone
), a stub uses a single method,invoke(Remote, Method, Object[], int)
, on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.1.2 style stubs no longer use this method. Instead of using a sequence of method calls to the remote reference (newCall
,invoke
, anddone
), a stub uses a single method,invoke(Remote, Method, Object[], int)
, on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.1.2 style stubs no longer use this method. Instead of using a sequence of method calls on the stub's the remote reference (newCall
,invoke
, anddone
), a stub uses a single method,invoke(Remote, Method, Object[], int)
, on the remote reference to carry out parameter marshalling, remote method executing and unmarshalling of the return value.No replacement. ThesetRef
method was intended for setting the remote reference of a remote stub. This is unnecessary, sinceRemoteStub
s can be created and initialized with a remote reference through use of theRemoteStub(RemoteRef)
constructor.no replacement. As of the Java 2 platform v1.2, RMI no longer uses this method to obtain a class loader's security context.replaced byloadClass(String,String)
methodno replacementno replacementThis method is deprecated because it supports only static stubs. UseexportObject(Remote, port)
orexportObject(Remote, port, csf, ssf)
instead.UseX509Certificate.getIssuerX500Principal()
instead. This method returns theissuer
as an implementation specificPrincipal
object, which should not be relied upon by portable code.UseX509Certificate.getSubjectX500Principal()
instead. This method returns thesubject
as an implementation specificPrincipal
object, which should not be relied upon by portable code.UseX509CertSelector.getIssuer()
orX509CertSelector.getIssuerAsBytes()
instead. This method should not be relied on as it can fail to match some certificates because of a loss of encoding information in the RFC 2253 String form of some distinguished names.UseX509CertSelector.getSubject()
orX509CertSelector.getSubjectAsBytes()
instead. This method should not be relied on as it can fail to match some certificates because of a loss of encoding information in the RFC 2253 String form of some distinguished names.UseX509CertSelector.setIssuer(X500Principal)
orX509CertSelector.setIssuer(byte[])
instead. This method should not be relied on as it can fail to match some certificates because of a loss of encoding information in the RFC 2253 String form of some distinguished names.UseX509CertSelector.setSubject(X500Principal)
orX509CertSelector.setSubject(byte[])
instead. This method should not be relied on as it can fail to match some certificates because of a loss of encoding information in the RFC 2253 String form of some distinguished names.UseX509CRL.getIssuerX500Principal()
instead. This method returns theissuer
as an implementation specificPrincipal
object, which should not be relied upon by portable code.UseX509CRLSelector.addIssuer(X500Principal)
orX509CRLSelector.addIssuerName(byte[])
instead. This method should not be relied on as it can fail to match some CRLs because of a loss of encoding information in the RFC 2253 String form of some distinguished names.useProvider.getVersionStr()
instead.This method used to return the value of a proprietary property in the master file of the "SUN" Cryptographic Service Provider in order to determine how to parse algorithm-specific parameters. Use the new provider-based and algorithm-independentAlgorithmParameters
andKeyFactory
engine classes (introduced in the J2SE version 1.2 platform) instead.UsesetParameter
.Replaced byengineSetParameter
.usegetBigDecimal(int parameterIndex)
orgetBigDecimal(String parameterName)
UsegetLogWriter
UsesetLogWriter
UsesetCharacterStream
UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
usegetCharacterStream
in place ofgetUnicodeStream
usegetCharacterStream
insteadThis method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicBoolean.compareAndExchange(boolean, boolean)
andAtomicBoolean.compareAndSet(boolean, boolean)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicBoolean.weakCompareAndSetPlain(boolean, boolean)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicInteger.compareAndExchange(int, int)
andAtomicInteger.compareAndSet(int, int)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicInteger.weakCompareAndSetPlain(int, int)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicIntegerArray.compareAndExchange(int, int, int)
andAtomicIntegerArray.compareAndSet(int, int, int)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicIntegerArray.weakCompareAndSetPlain(int, int, int)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicLong.compareAndExchange(long, long)
andAtomicLong.compareAndSet(long, long)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicLong.weakCompareAndSetPlain(long, long)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicLongArray.compareAndExchange(int, long, long)
andAtomicLongArray.compareAndSet(int, long, long)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicLongArray.weakCompareAndSetPlain(int, long, long)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicReference.compareAndExchange(V, V)
andAtomicReference.compareAndSet(V, V)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicReference.weakCompareAndSetPlain(V, V)
be used instead.This method has plain memory effects but the method name implies volatile memory effects (see methods such asAtomicReferenceArray.compareAndExchange(int, E, E)
andAtomicReferenceArray.compareAndSet(int, E, E)
). To avoid confusion over plain or volatile memory effects it is recommended that the methodAtomicReferenceArray.weakCompareAndSetPlain(int, E, E)
be used instead.As of JDK version 1.1, replaced byCalendar.get(Calendar.DAY_OF_MONTH)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.DAY_OF_WEEK)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.HOUR_OF_DAY)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.MINUTE)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.MONTH)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.SECOND)
.As of JDK version 1.1, replaced by-(Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / (60 * 1000)
.As of JDK version 1.1, replaced byCalendar.get(Calendar.YEAR) - 1900
.As of JDK version 1.1, replaced byDateFormat.parse(String s)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.DAY_OF_MONTH, int date)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.HOUR_OF_DAY, int hours)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.MINUTE, int minutes)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.MONTH, int month)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.SECOND, int seconds)
.As of JDK version 1.1, replaced byCalendar.set(Calendar.YEAR, year + 1900)
.As of JDK version 1.1, replaced byDateFormat.format(Date date)
, using a GMTTimeZone
.As of JDK version 1.1, replaced byDateFormat.format(Date date)
.As of JDK version 1.1, replaced byCalendar.set(year + 1900, month, date, hrs, min, sec)
orGregorianCalendar(year + 1900, month, date, hrs, min, sec)
, using a UTCTimeZone
, followed byCalendar.getTime().getTime()
.java.util.logging.LoggingMXBean
is deprecated and replaced withjava.lang.management.PlatformLoggingMXBean
. UseManagementFactory.getPlatformMXBean
(PlatformLoggingMXBean.class) instead.Values returned by this method may be synthesized, and may not correspond to the actual thread id, useLogRecord.getLongThreadID()
instead.LogRecord maintains timestamps with nanosecond resolution, usingInstant
values. For this reason,setInstant()
should be used in preference tosetMillis()
.This method doesn't allow to pass a long thread id, useLogRecord.setLongThreadID(long)
instead.This method does not throw an IOException if an I/O error occurs while saving the property list. The preferred way to save a properties list is via thestore(OutputStream out, String comments)
method or thestoreToXML(OutputStream os, String comment)
method.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.Thefinalize
method has been deprecated. Subclasses that overridefinalize
in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overridingfinalize
method. When overriding thefinalize
method, its implementation must explicitly ensure thatsuper.finalize()
is invoked as described inObject.finalize()
. See the specification forObject.finalize()
for further information about migration options.This method has no effect. The MBean Server used to obtain an attribute value isQueryEval.getMBeanServer()
.UseMBeanServer.getClassLoaderRepository()
to obtain the class loader repository and use it to deserialize.UsegetClassLoader
to obtain the class loader for deserialization.UsegetClassLoaderFor
to obtain the appropriate class loader for deserialization.As of JMX 1.2, replaced byCounterMonitor.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byCounterMonitor.getDerivedGaugeTimeStamp(ObjectName)
As of JMX 1.2, replaced byCounterMonitor.getThreshold(ObjectName)
As of JMX 1.2, replaced byCounterMonitor.setInitThreshold(java.lang.Number)
As of JMX 1.2, replaced byCounterMonitorMBean.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byCounterMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)
As of JMX 1.2, replaced byCounterMonitorMBean.getThreshold(ObjectName)
As of JMX 1.2, replaced byCounterMonitorMBean.setInitThreshold(java.lang.Number)
As of JMX 1.2, replaced byGaugeMonitor.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byGaugeMonitor.getDerivedGaugeTimeStamp(ObjectName)
As of JMX 1.2, replaced byGaugeMonitorMBean.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byGaugeMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)
As of JMX 1.2, replaced byMonitor.getObservedObjects()
As of JMX 1.2, replaced byMonitor.addObservedObject(javax.management.ObjectName)
As of JMX 1.2, replaced byMonitorMBean.getObservedObjects()
As of JMX 1.2, replaced byMonitorMBean.addObservedObject(javax.management.ObjectName)
As of JMX 1.2, replaced byStringMonitor.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byStringMonitor.getDerivedGaugeTimeStamp(ObjectName)
As of JMX 1.2, replaced byStringMonitorMBean.getDerivedGauge(ObjectName)
As of JMX 1.2, replaced byStringMonitorMBean.getDerivedGaugeTimeStamp(ObjectName)
This method is not needed because aValueExp
can access the MBean server in which it is being evaluated by usingQueryEval.getMBeanServer()
.TheHandshakeCompletedEvent.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.TheSSLSession.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.getCharacterStream should be used in its place- Replaced bygetText
- Replaced bysetText(text)
as of 1.4, replaced byKeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy)
As of 1.4, replaced byKeyboardFocusManager.getDefaultFocusTraversalPolicy()
As of JDK version 1.1, replaced byjava.awt.Component.setEnabled(boolean)
.As of JDK version 1.1, replaced byjava.awt.Component.setEnabled(boolean)
.As of 1.4, replaced byFocusTraversalPolicy
.As of 1.4, replaced byComponent.setFocusTraversalKeys(int, Set)
andContainer.setFocusCycleRoot(boolean)
.As of 1.4, replaced byFocusTraversalPolicy.getDefaultComponent(Container).requestFocus()
As of JDK 5, replaced byComponent.setBounds(int, int, int, int)
.Moves and resizes this component.
As of 1.4, replaced byFocusTraversalPolicy
As of Swing version 1.0.3, replaced bygetJMenuBar()
.As of Swing version 1.0.3 replaced bysetJMenuBar(JMenuBar m)
.As of JDK 1.7, replaced byJList.getSelectedValuesList()
replaced bygetComponent(int i)
As of Java 2 platform v1.2, replaced bygetPassword
.As of Java 2 platform v1.2, replaced bygetPassword
.replaced byContainer.getComponent(int)
As of Swing version 1.0.3 replaced bygetJMenuBar()
.As of Swing version 1.0.3 replaced bysetJMenuBar(JMenuBar menu)
.As of Swing version 1.0.2, replaced bynew JScrollPane(aTable)
.As of Swing version 1.0.3, replaced bydoLayout()
.As of Java 2 platform v1.3, replaced bygetScrollMode()
.As of Java 2 platform v1.3, replaced bysetScrollMode()
.use getKeyStroke(char)As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3.As of Java 2 platform v1.3, instead set the border on the divider.As of Java 2 platform v1.4.As of Java 2 platform v1.4.- Replaced byBasicScrollPaneUI.uninstallListeners(JComponent)
replaced byTextUI.getToolTipText2D(JTextComponent, Point2D)
The Applet API is deprecated. See the java.applet package documentation for further information.As of JDK version Swing1.1 replaced byJScrollPane.getViewportBorderBounds()
.As of 1.4, replaced byKeyboardFocusManager.getFocusOwner()
.as of Java 2 platform v1.3as of Java 2 platform v1.3As of Java 2 platform v1.3, use insertAtBoundaryreplaced byJTextComponent.modelToView2D(int)
replaced byJTextComponent.viewToModel2D(Point2D)
FontMetrics are not used for glyph rendering when running in the JDK.Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.As of JDK version 1.7useStandardJavaFileManager.getJavaFileObjectsFromPaths(Collection)
instead, to prevent the possibility of accidentally calling the method with a singlePath
as such an argument. AlthoughPath
implementsIterable<Path>
, it would almost never be correct to pass a singlePath
and have it be treated as anIterable
of its components.This method is subject to removal in a future version of Java SE. Use thesystem tool provider
orservice loader
mechanisms to locate system tools as well as user-installed tools.This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacementXMLEventFactory.newFactory(java.lang.String, java.lang.ClassLoader)
method defines no changes in behavior.This method has been deprecated to maintain API consistency. All newInstance methods have been replaced with corresponding newFactory methods. The replacementXMLInputFactory.newFactory(java.lang.String, java.lang.ClassLoader)
method defines no changes in behavior.This method has been deprecated because it returns an instance of XMLInputFactory, which is of the wrong class. Use the new methodXMLOutputFactory.newFactory(java.lang.String, java.lang.ClassLoader)
instead.useDatagramSocket.getOption(SocketOption)
instead.useServerSocket.getOption(SocketOption)
instead.useSocket.getOption(SocketOption)
instead.useDatagramSocket.setOption(SocketOption, Object)
instead.useServerSocket.setOption(SocketOption, Object)
instead.useSocket.setOption(SocketOption, Object)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.acceptSecContext(byte[], int, int)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.getMIC(byte[], int, int, MessageProp)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.initSecContext(byte[], int, int)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.unwrap(byte[], int, int, MessageProp)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.verifyMIC(byte[], int, int, byte[], int, int, MessageProp)
instead.The stream-based methods have been removed from RFC 8353. UseGSSContext.wrap(byte[], int, int, MessageProp)
instead.
-
ConstructorDescriptionIt is recommended that
AWTEvent(Object, int)
be used insteadas of JDK1.1; useKeyEvent(Component, int, long, int, int, char)
insteadAs of JDK version 1.1, the preferred way to tokenize an input stream is to convert it into a character stream, for example:Reader r = new BufferedReader(new InputStreamReader(is)); StreamTokenizer st = new StreamTokenizer(r);
It is rarely appropriate to use this constructor. The static factoryBoolean.valueOf(boolean)
is generally a better choice, as it is likely to yield significantly better space and time performance. Also consider using the final fieldsBoolean.TRUE
andBoolean.FALSE
if possible.It is rarely appropriate to use this constructor. UseBoolean.parseBoolean(String)
to convert a string to aboolean
primitive, or useBoolean.valueOf(String)
to convert a string to aBoolean
object.It is rarely appropriate to use this constructor. The static factoryByte.valueOf(byte)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseByte.parseByte(String)
to convert a string to abyte
primitive, or useByte.valueOf(String)
to convert a string to aByte
object.It is rarely appropriate to use this constructor. The static factoryCharacter.valueOf(char)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. The static factoryDouble.valueOf(double)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseDouble.parseDouble(String)
to convert a string to adouble
primitive, or useDouble.valueOf(String)
to convert a string to aDouble
object.It is rarely appropriate to use this constructor. Instead, use the static factory methodFloat.valueOf(float)
method as follows:Float.valueOf((float)value)
.It is rarely appropriate to use this constructor. The static factoryFloat.valueOf(float)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseFloat.parseFloat(String)
to convert a string to afloat
primitive, or useFloat.valueOf(String)
to convert a string to aFloat
object.It is rarely appropriate to use this constructor. The static factoryInteger.valueOf(int)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseInteger.parseInt(String)
to convert a string to aint
primitive, or useInteger.valueOf(String)
to convert a string to anInteger
object.It is rarely appropriate to use this constructor. The static factoryLong.valueOf(long)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseLong.parseLong(String)
to convert a string to along
primitive, or useLong.valueOf(String)
to convert a string to aLong
object.It is rarely appropriate to use this constructor. The static factoryShort.valueOf(short)
is generally a better choice, as it is likely to yield significantly better space and time performance.It is rarely appropriate to use this constructor. UseShort.parseShort(String)
to convert a string to ashort
primitive, or useShort.valueOf(String)
to convert a string to aShort
object.This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via theString
constructors that take aCharset
, charset name, or that use the platform's default charset.This method does not properly convert bytes into characters. As of JDK 1.1, the preferred way to do this is via theString
constructors that take aCharset
, charset name, or that use the platform's default charset.Use DatagramSocket instead for UDP transport.Use DatagramSocket instead for UDP transport.no replacementno replacementno replacementno replacementno replacementuseAuthProvider(String, String, String)
instead.useProvider(String, String, String)
instead.instead use the constructorDate(long date)
Use the constructor that takes a milliseconds value in place of this constructorinstead use the constructorTimestamp(long millis)
As of JDK version 1.1, replaced byCalendar.set(year + 1900, month, date)
orGregorianCalendar(year + 1900, month, date)
.As of JDK version 1.1, replaced byCalendar.set(year + 1900, month, date, hrs, min)
orGregorianCalendar(year + 1900, month, date, hrs, min)
.As of JDK version 1.1, replaced byCalendar.set(year + 1900, month, date, hrs, min, sec)
orGregorianCalendar(year + 1900, month, date, hrs, min, sec)
.As of JDK version 1.1, replaced byDateFormat.parse(String s)
.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 6 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.Release 7 is obsolete; update to a visitor for a newer release level.An instance created with this constructor cannot be used in a query.
-
Enum ConstantDescriptionas of 9, replaced by
InquireType.KRB5_GET_SESSION_KEY_EX
which returns an instance ofEncryptionKey
that implements theSecretKey
interface and has similar methods withKerberosKey
.