javarmi

Can't find RMI Registry


I'm trying to run a simple program to test Java RMI but when I type rmiregistry 6000 into the command window I get the following message.

'rmiregistry' is not recognized as an internal or external command, operable program or batch file.

I'm probably doing something stupid but I can't find RMI registry anywhere on the computer. Can someone tell me where to find it or how I can download it? I'm using windows 7 and java is up to date.


Solution

  • You are apparently using Windows. The (each) "standard" Oracle JRE installer for Windows puts everything in a subtree that you can override but defaults to **\Program Files\Java\jre<n> or Program Files (x86) for 32-bit java on 64-bit Windows, and copies a few EXEs java.exe javaw.exe javaws.exe and a few DLLs from the jre\bin subdirectory to \windows\system32 which is conventionally in your PATH because that's where lots and lots of other Windows programs are. The installer does NOT copy other programs like rmiregistry unpack200 keytool etc., so for those you need to either add the wherever\jre\bin directory to your PATH or explicitly specify the full pathname for the program. Or copy them to \windows\system32 yourself, but then you have to remember to remove or update them whenever your Java changes (which could occur automatically if you allow Java to auto-update).

    The installer does also make some registry settings so you can uninstall from appwiz (like other wellbehaved Windows programs) and the Java control panel appears like other control panels and the auto-updater does its thing unless you disable it, and some settings (I'm not sure if these are registry or elsewhere) so browsers like IE and Firefox can automatically run Java applets.