home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Sample.bin
/
Hello8Client.java
< prev
next >
Wrap
Text File
|
1997-09-06
|
769b
|
32 lines
/*
* Hello8Client.java
*
* Hello8Client uses RMI for methods in Hello8 class.
*/
package samples.rmi2;
import java.rmi.*;
public class Hello8Client
{
public static void main( String args[] )
{
String hostName = "localhost";
if( args.length > 0 )
hostName = args[0];
System.setSecurityManager( new RMISecurityManager() );
try
{
Hello8 remote = (Hello8) Naming.lookup( "rmi://" + hostName + "/Hello8Server" );
System.out.println( remote.printHello() + " It's now " + (remote.getTime()).toString() + " at the remote object." );
}
catch( Exception e )
{
System.out.println( e.toString() );
}
}
}