Solved

Meaning of URL in RMI

Posted on 1997-05-05
1
198 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now