java-rmi.exe/cgi

Erik Joelsson erik.joelsson at oracle.com
Thu Nov 10 07:14:58 PST 2011


Sometimes when converting makefiles in the jdk repo, I stumble over 
things that don't look right. The code seem to suggest one intention, 
but careful inspection reveals a different behavior. Normally I try to 
copy the actual behavior and put a note in the new make file about it. 
Now I discovered something that's just too weird:

In "jdk/make/sun/rmi/cgi/Makefile" the program "java-rmi.exe" is built. 
This looks like it's intended to be a windows native version of the 
"java-rmi.cgi" script that is available on linux and solaris. The 
makefile even copies java-rmi.exe to java-rmi.cgi. When creating the 
j2sdk/jre images, however, only the exe version is included. I verified 
this in the promoted builds of jdk 7 (b148 and a few others). The 
makefile also tries to declare that the program be compiled from 
"jdk/src/windows/bin/java-rmi.c" (by declaring FILES_c variable) but 
Program.gmk ignores this and just builds main.c (the standard java 
launcher) instead. So the "java-rmi.exe" in a windows distribution is 
just java.exe with a weird name.

What is this script/program used for, is it used at all, and how should 
I convert the building of it? I have tried compiling java-rmi.c and it 
seems to be working at least. (Gives same default output as the script 
on linux)

/Erik



More information about the build-infra-dev mailing list