• 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!