You can run rmiregistry from anywhere, but you must make sure that the compiled classes are already in your class path. For instance: -
E:\ARMSRemoteUpdater\WebContent\WEB-INF\classes>set classpath=%classpath%;E:\ARMSRemoteUpdater\WebContent\WEB-INF\classes <ENTER> E:\ARMSRemoteUpdater\WebContent\WEB-INF\classes>c: <ENTER> C:\>rmiregistry
And above should work fine.
In general, if you run rmiregistry from the root location of the compiled classes (the above example is E: \ ARMSRemoteUpdater \ WebContent \ WEB-INF \ classes), this will work, because. (dot-current directory) is already installed in your classpath.
But as soon as you delete. (dot-current directory) from your class path, the above working condition will also fail.
Hope I explained in detail.
source share