Properties.put("java.rmi.server.hostname", "123.456.789.321");


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :ÀÌ¿ø¿µ 1998³â 10¿ù 09ÀÏ 11:17:03

In Reply to: [Security Exception] posted by ¿µµ¹ÀÌ on 1998³â 10¿ù 09ÀÏ 09:55:17:

ÀÌ°÷ ¾îµò°¡¿¡µµ °ü·Ã±ÛÀÌ ÀÖ½À´Ï´Ù¸¸,
RMI Server°¡ ÀÚ½ÅÀÇ À̸§À» Registry¿¡ µî·ÏÇÒ¶§
rmi://xxx.domain.co.kr:1234/ServerName µî°ú °°Àº
¹æ¹ýÀ¸·Î full dns nameÀ¸·Î µî·ÏÇϱ⠶§¹®¿¡
¹ß»ýÇÕ´Ï´Ù.
RMI Server°¡ ÀÖ´Â ¸Ó½ÅÀÌ DNS¿¡ µî·ÏµÇ¾î ÀÖÁö ¾ÊÀ¸¸é
±âº»ÀûÀ¸·Î ¾ÈµÇ´Â °ÅÁö¿ä...
±×·¡¼­ RMI Server°¡ Resistry¿¡ µî·ÏÇÒ ¶§
dns nameÀÌ ¾Æ´Ï¶ó IP Address·Î µî·ÏÇϵµ·Ï ¹Ù²Ù¾î
ÁÖ¾î¾ß ÇÕ´Ï´Ù.
java.rmi.server.hostname ¶ó´Â property¿¡
¸Ó½Å IP address¸¦ settingÇØ ÁÖ¸é µÇÁö¿ä.


RMIÀÇ ±× ¹®Á¦´Â ¾Æ·¡¿Í °°Àº ¹æ¹ýÀ¸·Î ÇØ°áµË´Ï´Ù.
applet¿¡¼± Ưº°È÷ ÇÒ °ÍÀÌ ¾ø±¸¿ä..
RMI ServerºÎºÐÀ» ´ÙÀ½ ó·³ ÇØ º¸¼¼¿ä.
import java.net.*;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.LocateRegistry;
import java.util.*;


public class Server
{
static final String SERVER_NAME = "Dm_ia";
static final int SERVER_PORT = 7942;
public static void main(String argv[]) throws ClassNotFoundException
{
try{
InetAddress address = InetAddress.getLocalHost();
String thisHost = address.getHostAddress();


Properties properties = System.getProperties();
properties.put("java.rmi.server.hostname", thisHost);
System.setProperties(properties);


System.setSecurityManager (new RMISecurityManager());
LocateRegistry.createRegistry(server_port);

YourOwnRemoteServer remoteServer = new YourOwnRemoteServer();
Naming.rebind("//:" + SERVER_PORT + "/" + SERVER_NAME , remoteServer);
}
catch (Exception e){
e.printStackTrace();
}
}
}


´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]