I implemented a client and server programms using RMI. I wrote this both server and client classes in same project. But now I want to run this client and server programms separately (as two projects). So how can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Split your application into three artifacts/projects/JARs:
client– code that calls the server via RMI API. Depends onapiserver– implement the API on the server side. Obviouslyclientis not dependent on this artifactapi– bothclientandserverdepend on API:clientuses,serverimplements.This approach allows you to develop both
clientandserverindependently. Also changing theapican’t easily be missed since it is a separate project.