| Author |
Port already in use
|
Leandro Coutinho
Ranch Hand
Joined: Mar 04, 2009
Posts: 415
|
|
Hi folks! Happy New Year!!
I'm having problems with rmi. It doesn't matter which port I choose, I get Port already in use: 1212
Here's the code:
rmiregistry 1212 &
rmiregistry 1212 & java -cp classes -Djava.rmi.server.codebase=file:classes/ example.hello.Server
|
 |
Edward Harned
Ranch Hand
Joined: Sep 19, 2005
Posts: 288
|
|
|
The default port for the RMI Registry is 1099. Just leave out the port number.
|
Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
|
 |
Leandro Coutinho
Ranch Hand
Joined: Mar 04, 2009
Posts: 415
|
|
Thanks Edward!
My mistake was on the second line. The correct command is:
java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server
The documentation says to use an & in the end of the command, but it works without it and I don't know its utility.
So I just executed this in one console: rmiregistry
And this in on the other console: java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.Server
Regards,
Leandro.
|
 |
Edward Harned
Ranch Hand
Joined: Sep 19, 2005
Posts: 288
|
|
If you want to start a new process:
Windows is: start rmiregistry [optional port]
Unix is: rmiregistry [optional port] &
|
 |
 |
|
|
subject: Port already in use
|
|
|