JDK-8146299 : Disable rmic -Xnew
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-12-30
  • Updated: 2017-05-17
  • Resolved: 2017-02-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b158Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8174778 :  
Description
rmic -Xnew is the so-called "new rmic", an effort in 2003 to develop a new implementation of rmic based on javadoc and the doclet API.

The implementation is incomplete, in particular it never implemented the CORBA options to generate IDL or IIOP stubs. Furthermore it is not documented or supported.

rmic -Xnew is problematic for Project Jigsaw because the doclet API is changing. It doesn't seem worth trying to get it working, instead it is time to just remove it.

Comments
Assigning the issue to Stuart Marks per our email discussion.
05-01-2016

Clearly the right thing it to re-implement rmic to be based on standard langtools APIs, it's just not clear that it's worth investing in this now. Before setting out on such as effort then we'd need to make sure that we have a good test suite for generating IDL and IIOP stub/tie classes. For now, we've updated the old rmic implementation (based on old javac code) to use jrtfs so that it works with a modular run-time image. If someone has the time then perhaps this implementation could be switched to throw away the old javac code and use the current javac API or javax.lang.model. In the mean-time, I don't see any point keeping rmic -Xnew around. We've had to exclude the tests for this option and have not been planning (in Project Jigsaw) to put a lot of time into this tool so that these tests pass.
03-01-2016

I'm not sure removing -Xnew is right. The problem is that the "old" (current) rmic depends on the old, old, terribly obsolete Java compiler, which breaks whenever there's a syntactic change to Java. Oldjavac is now buried within rmic. Keeping the old compiler up to date is a terrible maintenance burden. It's also a burden to update rmic to the newer compiler (and javadoc) APIs. The question is which is worse. Despite RMI (JRMP) static stubs being deprecated, and CORBA's imminent deprecation, I doubt we will be able actually to get rid of static stubs for the forseeable future. Thus I think it's worth updating rmic to all the new tools APIs and jettisoning oldjavac. But this is worth a discussion.
03-01-2016