JDK-6512052 : remove java-rmi.exe and java-rmi.cgi
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 6,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2007-01-11
  • Updated: 2017-05-16
  • Resolved: 2015-11-03
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 9
9 b92Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
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
I don't think this issue needs a release note. This is part of the removal of HTTP proxying from RMI, which is better covered by JDK-8066750.
09-03-2017

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
05-12-2014

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".
29-10-2014

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.
31-03-2014

It's still present in the new build (explicitly to be compatible with the old build). See jdk/make/CompileLaunchers.gmk, around rows 620.
07-02-2014

EVALUATION We should look at removing this in jdk8.
25-06-2011

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.
14-03-2007