Solved

Meaning of URL in RMI

Posted on 1997-05-05
1
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

705 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