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