Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S RMI Options

 
Ian Redknapp
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To run my remote server i require the command line option:
'-Djava.rmi.server.codebase=file:///path/to/classes' however the assignment explicitly states 'Your programs must not require use of command line property specifications.' I would incldue specifiying the codebase within command line property specifications.

Am I missing something technically or am I reading too greater restriction into the specification ?
 
Jack Gold
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could employ a dialog to capture this information and/or use a properties file.
 
Ian Redknapp
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The assignment also states that the examiner 'must not require manual editing of any files' and I would consider an odd design where you set the location of the code once the application is running.
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ian,

You should not need such a setting. I am not an RMI expert, but I got it to run without having to make such a setting, neither from the command-line nor from within my program.

Did you use LocateRegistry.createRegistry() to create your RMI registry?

Frans.
 
Ian Redknapp
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that works a treat. Had been manually starting a registry previously.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic