United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6512052 JDK 6 launcher 'java-rmi.exe' is broken and has wrong name
JDK-6512052 : JDK 6 launcher 'java-rmi.exe' is broken and has wrong name

Details
Type:
Bug
Submit Date:
2007-01-11
Status:
Open
Updated Date:
2014-03-31
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
windows_xp
Sub-Component:
java.rmi
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
6
Targeted Versions:
tbd_major

Related Reports
Relates:
Relates:

Sub Tasks

Description
The launcher <jdkhome>[/jre]/java-rmi.exe, new in JDK 6 on Windows, is broken. It behaves just like any 'java.exe' launcher instead. It should also be named 'java-rmi.cgi' according to the JDK 6 build instructions.

The reason is that the JDK 6 build instructions in j2se/make/sun/rmi/cgi/Makefile is incomplete, not explicitly setting FILES_o, causing Program.gmk to override the local definitions of FILES_c, to build from the source at j2se/src/windows/bin/java-rmi.c, with normal java launcher defaults. A probable solution is to explicitly set FILES_o in the same way as has been done in j2se/make/java/jexec/Makefile.

It actually seems as if the rewrite of Program.gmk caused the build of java-rmi.cgi to fail, keeping the name java-rmi.exe, thus causing it to be included in Windows builds that as one of the final build steps in Release.gmk copies *.exe to the target bin directory.

Reading the build it seems the intention is to actually ship a working version of java-rmi.cgi also on Windows, so please update both the java-rmi.cgi build instructions and the Release.gmk packaging script to include it.

                                    

Comments
EVALUATION

This change for JDK 6 was certainly a mistake-- see 4418631: the java-rmi.cgi executable for Windows hasn't been bundled with the JDK since 1.1.x.  Although the intentional resolution of 4418631 was to not include a Windows java-rmi.cgi executable in the JDK, apparently enough of the broken make rules from its 1.1.x inclusion were left around for a bogus version of it to appear accidentally in JDK 6.

There was no approval to add a "java-rmi.exe" file to the "bin" directory for Windows in JDK 6, and because the file that is currently being put there serves no function (it's just the regular launcher), it should just be removed in order to return to the state of the previous several releases.  Furthermore, all vestiges of the Windows java-rmi.cgi should be removed from the make files so this can't happen again.
                                     
2007-03-14
EVALUATION

We should look at removing this in jdk8.
                                     
2011-06-25
It's still present in the new build (explicitly to be compatible with the old build). See jdk/make/CompileLaunchers.gmk, around rows 620.
                                     
2014-02-07
Well, whatever you do, don't fix this!! I mean, don't add back "java-rmi.cgi" with its correct name.

The RMI-CGI proxy facility is deprecated as of Java SE 8, so we will not be fixing anything in this area. It's not (yet) approved
for removal in 9 though.

However, since java-rmi.exe serves no purpose as it stands, it can and should simply be removed, independently of the deprecation
status of the RMI-CGI proxy.

                                     
2014-03-31



Hardware and Software, Engineered to Work Together