0

I get the following error when doing start rmiregistry from command prompt:

Windows cannot find 'rmiregistry'. Make sure you typed the name correctly, and then try again.

I want to start Java's rmi server from command prompt. I firstly change directory to the following path of the project: cd C:\Practical1\src\java\practical1 Then to start the server i write start rmiregistry I have also set some system variables of java's sdk bin folder.

Maybe i am doing something wrong or i have missed a step and that error comes up? enter image description here

csandreas1
  • 1,870
  • 19
  • 36
  • Your PATH doesn't include the JDK or JRE `bin` directory. – user207421 Dec 18 '17 at 23:33
  • I put that bin path in system variables. In cmd i type the project path – csandreas1 Dec 19 '17 at 05:21
  • If you did that correctly, it would have worked. As it doesn't work, you didn't do it correctly. Did you start a new command prompt after updating the system variables? – user207421 Dec 19 '17 at 07:58
  • Well i did exactly what it shows in the screenshot for cmd part. For system variables i just set the path to java bin folder and i named that java rmi – csandreas1 Dec 19 '17 at 08:01
  • I don't know what on earth you mean by 'I named that java rmi', but if you didn't do exactly what I have said here it won't work, and conversely if it doesn't work you haven't done exactly what I said here. – user207421 Dec 19 '17 at 09:14

1 Answers1

2

I can't say you what happened, but I can say how to research it.

Try %JRE_HOME%\bin\rmiregistry.exe, does it work?

Yes: it's a path problem, no: you have no JRE or rmiregistry.exe file.

When «no», make an approptiate installations.

When «yes», type set path in command prompt. Do you see full path to JRE's bin folder in output?

Yes: it should work, try to type rmiregistry.exe just there, does it work?

No: add it to PATH with Windows user interface. Note that you need to restart console (or other application) to use updated environment variables (PATH in our case).