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

Will I get penalty to use this approach to start a server?

 
Ken Kirin
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I would like to use java application to start a server. So I created "startServer.bat" file that has a command "start java suncertify.remote.MyRemoteRegistry". In my server application gui I have a button,"start server", that will call Runtime.exec("startServer.bat") when a user clicks click this button. Am I allowed to do this? Could i have a batch file in my submission since I didn't see this issue in my B&S 2.2.1 assignment? Any better solution?

Thank you
Ken Kirin

SCJP
SCWD
SCJD(B&S 2.2.1 In progress)
 
Vincent Hernandez
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't risk this. Looking at the instructions:

When you submit your assignment, each part (client and server) must be executable using a command of this exact form:




You would get an auto fail for this. In addition, using a bat file would imply windows dependency. I would not advice risking this.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should use the LocateRegistry.createRegistry method to start the registry and LocateRegistry.getRegistry to use an existing one. I posted the code to do this a week or so ago, so it should be easy to find by searching this forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic