Solved

Meaning of URL in RMI

Posted on 1997-05-05
1
204 Views
Last Modified: 2010-04-16
How do you set up an URL from the server and client side when using RMI.
Server: Name.redind(//myhost/???/name);, what is important for in the URL for the client to recognize the remote object. My program work on the same machine, but I will setup for running from different computer.

0
Comment
Question by:pjroy
1 Comment
 
LVL 6

Accepted Solution

by:
jpk041897 earned 0 total points
ID: 1220143
A URL as used by Java, is a Class that is initialized to an address.

See the Java Docs for the diferent constructor options, but in general they fall into the classification of:

String address = "127.0.0.1/Mydoc.html);
URL myURL;

try {
 myURL = new URL (address);
}
catch (MalformedURLException e){
 // whatever
}


So whenever you find a constructor that requires a URL, as in

Server: Name.redind(URL);

You replace the URL param  for the URL class instance you created.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java 8 lambda expresssions exception handling 3 91
starter POM and spring-boot-starter,  spring-boot-web 2 58
diffSum example 4 37
ejb on wildfly 5 20
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question