Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to start rmiregistry?

 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
When in server mode,I want to use a method called startRmiRegistry() to run the rmiregistry,instead of inputting "start rmiregistry" command in DOS,but I don't know how to write startRmiRegistry(),please help me.
Thands for your answer.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi He,

Have you looked at the methods in the java.rmi.registry.LocateRegistry class? In particular the createRegistry() method?

Regards, Andrew
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andrew Monkhouse:
Hi He,

Have you looked at the methods in the java.rmi.registry.LocateRegistry class? In particular the createRegistry() method?

Regards, Andrew


I have, and it works. Be sure to specify port 1099.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anton,

Originally posted by Anton Golovin:
I have, and it works. Be sure to specify port 1099.


In that case, have you looked at java.rmi.registry.Registry.REGISTRY_PORT ?

(Much better to use a constant than a magic number).

Regards, Andrew
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I most definitely have. It works very well.
 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
I solved it by your way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic