File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Question About RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Question About RMI" Watch "Question About RMI" New topic

Question About RMI

Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
Hi: everyone.
I am not konw so much about RMI. I get a problem about RMI now, I want to know how to compile those code in suncertify.client; in other words, how to compile codes distributed in different package?
Steven Hoodless
Ranch Hand

Joined: Mar 23, 2004
Posts: 64

Is your question about RMI or about compiling within packages?

Do you have a directory structure like this:- ?

suncertify - src - server
- gui
- database

- classes - server
- gui
- database

Perhaps your question is how to compile a src (example in the src/gui folder into the classes/gui folder?



Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
I do not think it is my problem.
you konw that client side must get a instance from server side, so I have to define a handle-value in client, but I can not import server code. I just want to know how to compile me client code? I really know a little about RMI. thanks for your reply,Steven.
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
I hope I understand your situation:

package RMIpackage;

goto scjda, type:
javac RMIpackage/
run it:
java RMIpackage.XXXRMI

Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
I think my description is not clear, so I wrote a test code to express my problem.

my code works well, but there is problem in my code. I can not import those codes at all, but if I do not import server side code, I can no compile all of my codes. I do not know how to deal with my problem, pls, help me.thanks.
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197
package server;

public interface DBRemote extends Remote, DBClient

// empty, just combines Remote abilities with Data interfacing

package client

public interface DBClient // just import this

// has all your methods for interfacing with data

Zhongbo Li

Joined: Dec 06, 2003
Posts: 23

SCJP,SCJD,软件设计师<br />Skype:mediumwave<br />QQ:85646604<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Question About RMI
jQuery in Action, 3rd edition