• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is the MyRemoteImplement1_Skel.class not created ?

 
John Drulo
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interface code:



Implementation class code:





This only generated the stub code when was run in the command prompt(Windows XP).

According to the HeadFirstJava text book, the skeleton code must also be generated.Why is it not generated?
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I vaguely remember skeletons have not been needed since Java 1.2 (or that could be Java 1.4 - either way quite a long time). From Java 5 onwards running RMIC is no longer needed, see the RMI tutorial http://docs.oracle.com/javase/tutorial/rmi/overview.html
 
John Drulo
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:I vaguely remember skeletons have not been needed since Java 1.2 (or that could be Java 1.4 - either way quite a long time). From Java 5 onwards running RMIC is no longer needed, see the RMI tutorial http://docs.oracle.com/javase/tutorial/rmi/overview.html


Hi Tony,

In the book Head First Java 2nd Edition that I am following , there is ample reference to Java 5.0(Tiger). So the authors of the book, wrote the book after Java 5.0 was released. And they specifically mention that both the stub and skeleton code will be generated on running rmic on the remote implementation. Are they wrong in saying so?
 
Tony Docherty
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing the context within which they make those statements it's hard to say. Certainly skeleton classes haven't been generated by rmic for some time - I believe the rmi system has a generic skeleton class which all remote objects use (but don't quote me on that). It is still correct to say rmic generates stubs and there is no harm in manually running rmic to do so, but since Java 5 you are no longer required to run rmic.

The book would probably have been timed to come out when Java 5 was first released and there may have been changes to RMI (for example no longer requiring rmic to be run) which were only announced after Java 5 (and the book) had been released.
I've just checked the unconfirmed errata for the book and these rmic statements are marked as being incorrect see: http://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=9780596009205.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!