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

NX: UrlyBird jar file startup requirement

 
Chee-Chan Keng
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
My instruction says I can only execute using a command of this exact form:
java -jar <path_and_filename> [<mode>]
but if I follow Max's book, starting RMI requires:
java -classpath sampleproject.jar sampleproject.remote.RegDVDDatabase
Any suggestion how do I modify the command so I can start it like the instruction required?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chee-Chan,
Originally posted by Chee-Chan Keng:
My instruction says I can only execute using a command of this exact form:
java -jar <path_and_filename> [<mode>]
but if I follow Max's book, starting RMI requires:
java -classpath sampleproject.jar sampleproject.remote.RegDVDDatabase
Any suggestion how do I modify the command so I can start it like the instruction required?

In Max's book take a look at Listing 5-10 RegDVDDatabase.java on pages 180-182. Notice particularly the TIP on page 181 and the last couple of paragraphs on page 181.
The short answer to your question is that you want to include similar functionality to sampleproject.remote.RegDVDDatabase in your runme.jar so that the RMI registry can be started programmatically from within your application. The DVDConnector class (page 182) shows one way to do this.
Also, this topic is discussed in this thread: Topic: RMI Binding on localhost
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic