Deprecated API
Contents
- Terminally Deprecated
- Interfaces
- Classes
- Exception Classes
- Fields
- Methods
- Constructors
- Enum Constants
-
ElementDeprecated inDescription16169The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9Finalization has been deprecated for removal. See
Object.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9The Applet API is deprecated. See the java.applet package documentation for further information.9It is recommended to useBeans.instantiate(ClassLoader, String, BeanContext)
, because the Applet API is deprecated. See the java.applet package documentation for further information.9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9It is rarely appropriate to use this constructor. Instead, use the static factory methodFloat.valueOf(float)
method as follows:Float.valueOf((float)value)
.9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.9Finalization is deprecated and subject to removal in a future release. The use of finalization can lead to problems with security, performance, and reliability. See JEP 421 for discussion and alternatives.Subclasses that override
finalize
to perform cleanup should use alternative cleanup mechanisms and remove thefinalize
method. UseCleaner
andPhantomReference
as safer ways to release resources when an object becomes unreachable. Alternatively, add aclose
method to explicitly release resources, and implementAutoCloseable
to enable use of thetry
-with-resources statement.This method will remain in place until finalizers have been removed from most existing code.
18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.When running in a JVM in which finalization has been disabled or removed, no objects will be pending finalization, so this method does nothing.
17The Security Manager is deprecated and subject to removal in a future release. There is no replacement for the Security Manager. See JEP 411 for discussion and alternatives.1.49It 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.9It 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.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.When running in a JVM in which finalization has been disabled or removed, no objects will be pending finalization, so this method does nothing.
17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.1.2This method was originally specified to resume a thread suspended withThread.suspend()
. Suspending a thread was inherently deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.1.2This method was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath
. It was inherently unsafe. Stopping a thread caused it to unlock all of the monitors that it had locked (as a natural consequence of theThreadDeath
exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects became visible to other threads, potentially resulting in arbitrary behavior. Usages 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?.1.2This method was originally specified to suspend a thread. It was inherently deadlock-prone. If the target thread held a lock on a monitor protecting a critical system resource when it was suspended, no thread could access the resource until the target thread was resumed. If the thread intending to resume the target thread attempted to lock the monitor prior to callingresume
, deadlock would result. Such deadlocks typically manifested themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.20Thread.stop()
was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath
. It was inherently unsafe and deprecated in an early JDK release. The ability to "stop" a thread withThread.stop
has been removed and theThread.stop
method changed to throw an exception. Consequently,ThreadDeath
is also deprecated, for removal.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.16This method was originally specified to destroy an empty thread group. The ability to explicitly destroy a thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is a daemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is destroyed. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.1.2This method was originally specified to resume all threads in the thread group.16This method originally configured whether the thread group is a daemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.1.2This method was originally specified to stop all threads in the thread group. It was inherently unsafe.1.2This method was originally specified to suspend all threads in the thread group.1.8This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.1.2This 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.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.1.2This 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
.1.2This 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
.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.1.2This 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
.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.1621This method supported the legacy Subject Delegation feature, and is only useful in conjunction with other APIs which are deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement.9An 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);
9TheHandshakeCompletedEvent.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.9TheSSLSession.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.18This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, performing work as a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.callAs(javax.security.auth.Subject, java.util.concurrent.Callable<T>)
has been added which can be used to perform the same work.18This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, performing work as a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.callAs(javax.security.auth.Subject, java.util.concurrent.Callable<T>)
has been added which can be used to perform the same work.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, obtaining a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.current()
has been added which can be used to obtain the current subject.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9The Applet API is deprecated, no replacement.17Obsolete method, not used anymore.17Obsolete method, not used anymore.17Obsolete method, not used anymore.171717171717It is recommended thatBasicToolBarUI.createFloatingWindow(JToolBar)
be used instead219The Applet API is deprecated. See the java.applet package documentation for further information.16
-
InterfaceDeprecated inDescription9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated, no replacement.9The Applet API is deprecated. See the java.applet package documentation 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.1.2This class is deprecated and subject to removal in a future version of Java SE. It has been replaced by
java.security.cert.Certificate
and related classes.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.9LoggingMXBean
is no longer aplatform MXBean
and is replaced withPlatformLoggingMXBean
. It will not register in the platformMBeanServer
. UseManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class)
instead.9This interface has been deprecated. See theObservable
class for further information.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.1.5This interface has been replaced by the SAX2Attributes
interface, which includes Namespace support.1.5This interface has been replaced by the SAX2ContentHandler
interface, which includes Namespace support.1.5This interface has been replaced by the SAX2XMLReader
interface, which includes Namespace support.
-
ClassDeprecated inDescription9The Applet API is deprecated, no replacement.9It 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.17The Security Manager is deprecated and subject to removal in a future release. There is no replacement for the Security Manager. See JEP 411 for discussion and alternatives.1.8This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.no replacementno replacementStatically generated stubs are deprecated, since stubs are generated dynamically. SeeUnicastRemoteObject
for information about dynamic stub generation.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.1.2This 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
.1.2This 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
.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.1.2This 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
.9This 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.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.20This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans. This feature is not usable without a Security Manager, which is deprecated and subject to removal in a future release. Consequently, this API is also deprecated and subject to removal. There is no replacement.17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9The 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
.1717171717As of Java 2 platform v1.4.9As of JDK version 9. Obsolete class.9As of JDK version 9. Obsolete class.A table cell can now be any View implementation.16Java 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.1.5This class works with the deprecatedDocumentHandler
interface. It has been replaced by the SAX2DefaultHandler
class.1.5This class implements a deprecated interface,AttributeList
; that interface has been replaced byAttributes
, which is implemented in theAttributesImpl
helper class.1.5This class works with the deprecatedParser
interface.9It is recommended to useSAXParserFactory
instead.
-
Exception ClassDeprecated inDescriptionThis exception is no longer thrownThis exception is no longer thrown20
Thread.stop()
was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath
. It was inherently unsafe and deprecated in an early JDK release. The ability to "stop" a thread withThread.stop
has been removed and theThread.stop
method changed to throw an exception. Consequently,ThreadDeath
is also deprecated, for removal.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 replacement17This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.9Use the classes injava.security.cert
instead.
-
FieldDeprecated inDescriptionAs 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)
.9It is recommended that ALT_GRAPH_DOWN_MASK andInputEvent.getModifiersEx()
be used instead9It is recommended that ALT_DOWN_MASK andInputEvent.getModifiersEx()
be used instead9It is recommended that BUTTON1_DOWN_MASK andInputEvent.getModifiersEx()
be used instead9It is recommended that BUTTON2_DOWN_MASK andInputEvent.getModifiersEx()
be used instead. Note that BUTTON2_MASK has the same value as ALT_MASK.9It is recommended that BUTTON3_DOWN_MASK andInputEvent.getModifiersEx()
be used instead. Note that BUTTON3_MASK has the same value as META_MASK.9It is recommended that CTRL_DOWN_MASK andInputEvent.getModifiersEx()
be used instead9It is recommended that META_DOWN_MASK andInputEvent.getModifiersEx()
be used instead9It 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
.17This field predates the general-purpose exception chaining facility. TheThrowable.getCause()
method is now the preferred means of obtaining this information.1.5Instead 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.9UseRoundingMode.CEILING
instead.9UseRoundingMode.DOWN
instead.9UseRoundingMode.FLOOR
instead.9UseRoundingMode.HALF_DOWN
instead.9UseRoundingMode.HALF_EVEN
instead.9UseRoundingMode.HALF_UP
instead.9UseRoundingMode.UNNECESSARY
instead.9UseRoundingMode.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.19This field uses the default values defined in the PKCS #1 standard. Some of these defaults are no longer recommended due to advances in cryptanalysis -- see the PKCS#1 v2.2 standard for more details. Thus, it is recommended to create a newPSSParameterSpec
with the desired parameter values using thePSSParameterSpec(String, String, AlgorithmParameterSpec, int, int)
constructor.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.19This field uses the default values defined in the PKCS #1 standard. Some of these defaults are no longer recommended due to advances in cryptanalysis -- see Appendix B.1 of PKCS #1 for more details. Thus, it is recommended to create a newOAEPParameterSpec
with the desired parameter values using theOAEPParameterSpec(String, String, AlgorithmParameterSpec, PSource)
constructor.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.9An 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
-
MethodDeprecated inDescription15A JVM TI based JDWP back-end will never set this capability to true.15A JVM TI based JDWP back-end will never set this capability to true.14Use
OperatingSystemMXBean.getFreeMemorySize()
instead of this historically named method.14UseOperatingSystemMXBean.getCpuLoad()
instead of this historically named method.14UseOperatingSystemMXBean.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()
.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)
.9It is recommended that extended modifier keys andInputEvent.getModifiersEx()
be used instead9It 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)
.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.As of JDK version 1.1, replaced bygetClipBounds()
.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)
.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details 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
.10It 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)
.9It 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 default charset.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.1.1Replaced by isJavaIdentifierStart(char).1.1Replaced by isJavaIdentifierPart(char).1.1Replaced by isWhitespace(char).9This 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
clazz.newInstance()
clazz.getDeclaredConstructor().newInstance()
InvocationTargetException
andNoSuchMethodException
. Both of these exception types are subclasses ofReflectiveOperationException
.1.1Replaced bydefineClass(String, byte[], int, int)
9If 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.18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.14This 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.18Finalization has been deprecated for removal. SeeObject.finalize()
for details.9Finalization is deprecated and subject to removal in a future release. The use of finalization can lead to problems with security, performance, and reliability. See JEP 421 for discussion and alternatives.Subclasses that override
finalize
to perform cleanup should use alternative cleanup mechanisms and remove thefinalize
method. UseCleaner
andPhantomReference
as safer ways to release resources when an object becomes unreachable. Alternatively, add aclose
method to explicitly release resources, and implementAutoCloseable
to enable use of thetry
-with-resources statement.This method will remain in place until finalizers have been removed from most existing code.
9If 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.16This 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.9This 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.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[])
orProcessBuilder
should be used instead. The command string is broken into tokens using only whitespace characters. For an argument with an embedded space, such as a filename, this can cause problems as the token does not include the full filename.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[], String[])
orProcessBuilder
should be used instead. The command string is broken into tokens using only whitespace characters. For an argument with an embedded space, such as a filename, this can cause problems as the token does not include the full filename.18This method is error-prone and should not be used, the corresponding methodRuntime.exec(String[], String[], File)
orProcessBuilder
should be used instead. The command string is broken into tokens using only whitespace characters. For an argument with an embedded space, such as a filename, this can cause problems as the token does not include the full filename.18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.When running in a JVM in which finalization has been disabled or removed, no objects will be pending finalization, so this method does nothing.
10As 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.10As 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.10As 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.1.41.1This 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 thedefault charset
.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.18Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.When running in a JVM in which finalization has been disabled or removed, no objects will be pending finalization, so this method does nothing.
17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.19This method is not final and may be overridden to return a value that is not the thread ID. UseThread.threadId()
instead.1.2This method was originally specified to resume a thread suspended withThread.suspend()
. Suspending a thread was inherently deadlock-prone. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.1.2This method was originally specified to "stop" a victim thread by causing the victim thread to throw aThreadDeath
. It was inherently unsafe. Stopping a thread caused it to unlock all of the monitors that it had locked (as a natural consequence of theThreadDeath
exception propagating up the stack). If any of the objects previously protected by these monitors were in an inconsistent state, the damaged objects became visible to other threads, potentially resulting in arbitrary behavior. Usages 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?.1.2This method was originally specified to suspend a thread. It was inherently deadlock-prone. If the target thread held a lock on a monitor protecting a critical system resource when it was suspended, no thread could access the resource until the target thread was resumed. If the thread intending to resume the target thread attempted to lock the monitor prior to callingresume
, deadlock would result. Such deadlocks typically manifested themselves as "frozen" processes. For more information, see Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.16This method was originally specified to destroy an empty thread group. The ability to explicitly destroy a thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is a daemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.16This method originally indicated if the thread group is destroyed. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.1.2This method was originally specified to resume all threads in the thread group.16This method originally configured whether the thread group is a daemon thread group that is automatically destroyed when its last thread terminates. The concept of daemon thread group no longer exists. A thread group is eligible to be GC'ed when there are no live threads in the group and it is otherwise unreachable.1.2This method was originally specified to stop all threads in the thread group. It was inherently unsafe.1.2This method was originally specified to suspend all threads in the thread group.9The methodBigDecimal.divide(BigDecimal, RoundingMode)
should be used in preference to this legacy method.9The methodBigDecimal.divide(BigDecimal, int, RoundingMode)
should be used in preference to this legacy method.9The methodBigDecimal.setScale(int, RoundingMode)
should be used in preference to this legacy method.17UseDatagramChannel
, or subclassDatagramSocket
directly.
This method provided a way in early JDK releases to replace the system wide implementation ofDatagramSocket
. It has been mostly obsolete since Java 1.4. If required, aDatagramSocket
can be created to use a custom implementation by extendingDatagramSocket
and using the protected constructor that takes an implementation as a parameter.use getTimeToLive instead.use setTimeToLive instead.14The network interface may not be uniquely identified by the InetAddress returned. UseMulticastSocket.getNetworkInterface()
instead.14use theMulticastSocket.getTimeToLive()
method instead, which returns an int instead of a byte.14This method does not accept the network interface on which to join the multicast group. UseMulticastSocket.joinGroup(SocketAddress, NetworkInterface)
instead.14This 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.getOption(StandardSocketOptions.IP_MULTICAST_TTL); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, newttl); mcastSocket.send(p); mcastSocket.setOption(StandardSocketOptions.IP_MULTICAST_TTL, ttl); ......
14The InetAddress may not uniquely identify the network interface. UseMulticastSocket.setNetworkInterface(NetworkInterface)
instead.14UseDatagramSocket.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 theMulticastSocket.setTimeToLive(int)
method instead, which uses int instead of byte as the type for ttl.17Use aServerSocketFactory
and subclassServerSocket
directly.
This method provided a way in early JDK releases to replace the system wide implementation ofServerSocket
. It has been mostly obsolete since Java 1.4. If required, aServerSocket
can be created to use a custom implementation by extendingServerSocket
and using the protected constructor that takes an implementation as a parameter.17Use aSocketFactory
and subclassSocket
directly.
This method provided a way in early JDK releases to replace the system wide implementation ofSocket
. It has been mostly obsolete since Java 1.4. If required, aSocket
can be created to use a custom implementation by extendingSocket
and using the protected constructor that takes an implementation as a parameter.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 default charset. Instead, use the decode(String,String) method to specify the encoding.The resulting string may vary depending on the default charset. 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.16UseX509Certificate.getIssuerX500Principal()
instead. This method returns theissuer
as an implementation specificPrincipal
object, which should not be relied upon by portable code.16UseX509Certificate.getSubjectX500Principal()
instead. This method returns thesubject
as an implementation specificPrincipal
object, which should not be relied upon by portable code.16UseX509CertSelector.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.16UseX509CertSelector.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.16UseX509CertSelector.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.16UseX509CertSelector.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.16UseX509CRL.getIssuerX500Principal()
instead. This method returns theissuer
as an implementation specificPrincipal
object, which should not be relied upon by portable code.16UseX509CRLSelector.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.9useProvider.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
.1.2usegetBigDecimal(int parameterIndex)
orgetBigDecimal(String parameterName)
1.21.21.21.21.21.21.2UsegetLogWriter
1.2UsesetLogWriter
1.2UsesetCharacterStream
1.2UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
1.2UsegetBigDecimal(int columnIndex)
orgetBigDecimal(String columnLabel)
1.2usegetCharacterStream
in place ofgetUnicodeStream
1.2usegetCharacterStream
instead1.21.21.21.21.21.21.29This 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.9This 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.9This 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.9This 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.9This 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.9This 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.9This 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.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.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()
.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.9java.util.logging.LoggingMXBean
is deprecated and replaced withjava.lang.management.PlatformLoggingMXBean
. UseManagementFactory.getPlatformMXBean
(PlatformLoggingMXBean.class) instead.16Values 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()
.16This 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.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.9Finalization has been deprecated for removal. SeeObject.finalize()
for background information and details about migration options.This method has no effect. The MBean Server used to obtain an attribute value isQueryEval.getMBeanServer()
.1.5UseMBeanServer.getClassLoaderRepository()
to obtain the class loader repository and use it to deserialize.1.5UsegetClassLoader
to obtain the class loader for deserialization.1.5UsegetClassLoaderFor
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)
21This method supported the legacy Subject Delegation feature, and is only useful in conjunction with other APIs which are deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement.This method is not needed because aValueExp
can access the MBean server in which it is being evaluated by usingQueryEval.getMBeanServer()
.9TheHandshakeCompletedEvent.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.9TheSSLSession.getPeerCertificates()
method that returns an array ofjava.security.cert.Certificate
should be used instead.18This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, performing work as a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.callAs(javax.security.auth.Subject, java.util.concurrent.Callable<T>)
has been added which can be used to perform the same work.18This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, performing work as a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.callAs(javax.security.auth.Subject, java.util.concurrent.Callable<T>)
has been added which can be used to perform the same work.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this method is also deprecated and subject to removal. There is no replacement for the Security Manager or this method.17This method depends onAccessControlContext
which, in conjunction with the Security Manager, is deprecated and subject to removal in a future release. However, obtaining a Subject is useful independent of the Security Manager. Thus, a replacement API namedSubject.current()
has been added which can be used to obtain the current subject.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()
9As 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)17Obsolete method, not used anymore.17Obsolete method, not used anymore.17Obsolete method, not used anymore.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.999917It is recommended thatBasicToolBarUI.createFloatingWindow(JToolBar)
be used insteadAs of Java 2 platform v1.4.As of Java 2 platform v1.4.- Replaced byBasicScrollPaneUI.uninstallListeners(JComponent)
9999219replaced byTextUI.getToolTipText2D(JTextComponent, Point2D)
99999The 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 insertAtBoundary9replaced byJTextComponent.modelToView2D(int)
9replaced byJTextComponent.viewToModel2D(Point2D)
FontMetrics are not used for glyph rendering when running in the JDK.999999Table cells can now be any arbitrary View implementation and should be produced by the ViewFactory rather than the table.9999999999As of JDK version 1.713useStandardJavaFileManager.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.9This 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.1.7This 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.1.7This 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.1.7This 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.16useDatagramSocket.getOption(SocketOption)
instead.16useServerSocket.getOption(SocketOption)
instead.16useSocket.getOption(SocketOption)
instead.16useDatagramSocket.setOption(SocketOption, Object)
instead.16useServerSocket.setOption(SocketOption, Object)
instead.16useSocket.setOption(SocketOption, Object)
instead.1611The stream-based methods have been removed from RFC 8353. UseGSSContext.acceptSecContext(byte[], int, int)
instead.11The stream-based methods have been removed from RFC 8353. UseGSSContext.getMIC(byte[], int, int, MessageProp)
instead.11The stream-based methods have been removed from RFC 8353. UseGSSContext.initSecContext(byte[], int, int)
instead.11The stream-based methods have been removed from RFC 8353. UseGSSContext.unwrap(byte[], int, int, MessageProp)
instead.11The stream-based methods have been removed from RFC 8353. UseGSSContext.verifyMIC(byte[], int, int, byte[], int, int, MessageProp)
instead.11The stream-based methods have been removed from RFC 8353. UseGSSContext.wrap(byte[], int, int, MessageProp)
instead.
-
ConstructorDeprecated inDescription16169It 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);
9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.9It is rarely appropriate to use this constructor. Instead, use the static factory methodFloat.valueOf(float)
method as follows:Float.valueOf((float)value)
.9It 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.9It 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.9It 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.9It 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.9It 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.9It 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.179It 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.9It 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.1.1This 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 thedefault charset
.1.1This 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 thedefault charset
.Use DatagramSocket instead for UDP transport.Use DatagramSocket instead for UDP transport.20UseURI.toURL()
to construct an instance of URL. See the note on constructor deprecation for more details.20UseURI.toURL()
to construct an instance of URL. See the note on constructor deprecation for more details.20UseURL.of(URI, URLStreamHandler)
to construct an instance of URL associated with a custom protocol handler. See the note on constructor deprecation for more details.20UseURI.toURL()
to construct an instance of URL. See the note on constructor deprecation for more details.20UseURI.toURL()
to construct an instance of URL. See the note on constructor deprecation for more details.20UseURL.of(URI, URLStreamHandler)
to construct an instance of URL associated with a custom protocol handler. See the note on constructor deprecation for more details.no replacementno replacementno replacementno replacementno replacement9useAuthProvider(String, String, String)
instead.9useProvider(String, String, String)
instead.19This constructor uses the default values defined in the PKCS #1 standard except for the salt length. Some of these defaults are no longer recommended due to advances in cryptanalysis -- see the PKCS#1 v2.2 standard for more details. Thus, it is recommended to explicitly specify all desired parameter values with thePSSParameterSpec(String, String, AlgorithmParameterSpec, int, int)
constructor.1.2instead use the constructorDate(long date)
1.2Use the constructor that takes a milliseconds value in place of this constructor1.2instead 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)
.19Locale constructors have been deprecated. See Obtaining a Locale for other options.19Locale constructors have been deprecated. See Obtaining a Locale for other options.19Locale constructors have been deprecated. See Obtaining a Locale for other options.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.9Release 6 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.12Release 7 is obsolete; update to a visitor for a newer release level.An instance created with this constructor cannot be used in a query.16
-
Enum ConstantDeprecated inDescriptionas of 9, replaced by
InquireType.KRB5_GET_SESSION_KEY_EX
which returns an instance ofEncryptionKey
that implements theSecretKey
interface and has similar methods withKerberosKey
.