| |
技术文档>>JAVA>>新手入门>>基础入门>查看文档 |
|
| |
java核心代码例程之:rmiexamplesetup.java |
|
| |
文章作者:未知 文章来源:水木森林 |
|
| |
查看:237次 录入:管理员--2007-11-17 |
|
| |
import java.rmi.*; import javax.naming.*;
/** * this class registers rmiexampleserver with the rmi registry * @author renga **/ public class rmiexamplesetup {
/** * main method * @param args command-line arguments **/ public static void main( string[] args ) { try { // set the security manager system.setsecuritymanager( new rmisecuritymanager() );
// create a new object of rmiexampleserver rmiexampleserver server = new rmiexampleserver();
// bind this object with the rmi registry naming.bind( "rmiexample", server ); } catch( exception e ) { e.printstacktrace(); } } }
|
|