Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question About RMI

 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yanxin,

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 j1.java) in the src/gui folder into the classes/gui folder?

Regards,

Steven
 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steven,
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
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope I understand your situation:
scjda/RMIpackage/XXXRMI.java

inside XXXRMI.java:
package RMIpackage;
...

goto scjda, type:
javac RMIpackage/XXXRMI.java
run it:
java RMIpackage.XXXRMI
 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
要使用rmic
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic