JDK-8225025 : deprecate rmic for removal
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.rmi
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 13
  • Submitted: 2019-05-29
  • Updated: 2020-04-06
  • Resolved: 2019-05-31
Related Reports
CSR :  
Relates :  
Description
Summary
-------

Upgrade the status of the *rmic* tool from ordinarily deprecated to terminally deprecated.

Problem
-------

RMI static stubs, and the *rmic* tool, have been ordinarily deprecated since Java 8 (JDK-8023863, JDK-8026020). RMI dynamic stubs have been available as a functionally equivalent replacement since Java 5. As such, there is no longer a need for applications to generate static stubs using a tool such as *rmic*.

Solution
--------

Change the deprecation status of *rmic* from ordinary to terminal, and eventually remove it from the set of tools delivered with the JDK.

Specification
-------------

There is no API for rmic. The only "specification" is the tool's man page. It will be changed to reflect the upgraded deprecation status. In addition, the tool emits a deprecation warning when it's run. This message will also be changed to reflect the upgraded deprecation status.

The current tool documentation states the following:

> **Deprecation Note:** Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated. Oracle recommends that you use dynamically generated JRMP stubs instead, eliminating the need to use this tool for JRMP-based applications. See the java.rmi.server.UnicastRemoteObject specification at http://docs.oracle.com/javase/8/docs/api/java/rmi/server/UnicastRemoteObject.html for further information.

The proposed replacement text is:

> **Deprecation Note:** The rmic tool has been deprecated and is subject to removal in a future release. Support for static generation of Java Remote Method Protocol (JRMP) stubs and skeletons has been deprecated. Applications should use dynamically generated JRMP stubs, eliminating the need to use the rmic tool for JRMP-based applications.

The tool currently emits the following warning message:

> Warning: generation and use of skeletons and static stubs for JRMP is deprecated. Skeletons are unnecessary, and static stubs have been superseded by dynamically generated stubs. Users are encouraged to migrate away from using rmic to generate skeletons and static stubs. See the documentation for java.rmi.server.UnicastRemoteObject.

The proposed replacement warning text is:

> Warning: rmic has been deprecated and is subject to removal in a future release. Generation and use of skeletons and static stubs for JRMP is deprecated. Skeletons are unnecessary, and static stubs have been superseded by dynamically generated stubs. Users are encouraged to migrate away from using this tool to generate skeletons and static stubs. See the documentation for java.rmi.server.UnicastRemoteObject.

Comments
Moving to Approved.
31-05-2019