United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6512052 : remove java-rmi.exe and java-rmi.cgi

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

Related Reports
Blocks:
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
Relevant files:

jdk/make/launcher/Launcher-java.rmi.gmk -- the section covering the launchers can probably simply be deleted
jdk/src/java.rmi/unix/bin/java-rmi.cgi.sh -- remove this entirely
jdk/test/tools/launcher/VersionCheck.java -- remove references to java-rmi.cgi
                                     
2014-12-05
Time to remove java-rmi.exe and java-rmi.cgi once and for all in JDK 9. Removing it will save some effort trying to fix it up in the modularized JDK image. Plus as this bug documents, it's mostly been broken since forever.

java-rmi.cgi is a shell script that lives in $JAVA_HOME/bin on Linux on Solaris (but not on Mac; apparently it was never added). It basically launches the JVM with some arguments and a start-class that will proxy an incoming RMI-over-HTTP request into RMI.

java-rmi.exe is a launcher that lives in $JAVA_HOME/bin on Windows. It apparently functions identically to the normal java.exe launcher, and it doesn't do anything special with RMI or HTTP at all.

Changing the summary to reflect the actual action to be taken. The old summary was, "JDK 6 launcher 'java-rmi.exe' is broken and has wrong name".
                                     
2014-10-29
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
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
EVALUATION

We should look at removing this in jdk8.
                                     
2011-06-25
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



Hardware and Software, Engineered to Work Together