File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes beginner codebase question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "beginner codebase question" Watch "beginner codebase question" New topic
Author

beginner codebase question

xiaoyi hou
Greenhorn

Joined: May 20, 2001
Posts: 21
should the codebase specify where to find the stub file, or the server class file, or both of them?
thanks
X HOU
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1109

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.


 
 
subject: beginner codebase question
 
Threads others viewed
class not found exception ,open HTTP connection failed
Applet permissions trouble
access denied java.io.FilePermission
createRobot
Applet not shown in Eclipse internal browser.
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture