• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

beginner codebase question

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
should the codebase specify where to find the stub file, or the server class file, or both of them?
thanks
X HOU
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by xiaoyi hou:
should the codebase specify where to find the stub file, or the server class file, or both of them?
thanks
X HOU




Hi X HOU,
I always put my generated stub (and skel) files in the same directory as the implementation class (i.e. the class that implements the remote interface), and I always set my <code>java.rmi.server.codebase</code> property to the root directory of the location of the implementation class.

Example (for Micro$oft Windows):


1. Suppose following (partial) definition for implementation class

<blockquote>
<pre>
package my.rmi.package;
public class RemIfImpl extends UnicastRemoteObject {
}
</pre>
</blockquote>
2. And suppose the generated ".class" file sits in directory

C:\java\classes\my\rmi\package

So the "codebase" property is

file://localhost/C:\java\classes\




Hope this helps,

Avi.


 
reply
    Bookmark Topic Watch Topic
  • New Topic