±è»ó¿íÀÇ LIVECONNECTION - ¾ÖÇø´°ú ÀÚ¹Ù½ºÅ©¸³Æ®¿ÍÀÇ Åë½Å

 

¡Ø °­Á¿¡ ´ëÇÑ Áú¹®Àº '¹®ÀÇ°Ô½ÃÆÇ'¿¡¼­ ÇØÁÖ¼¼¿ä.

   ¾È³çÇϼ¼¿ä. À̹ø °­Á´ ¾ÖÇø´¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ È£ÃâÇÏ´Â ¹æ¹ý¿¡ ´ëÇÑ ³»¿ëÀ» ´Ù·ç°í ÀÖ½À´Ï´Ù. ¾Æ¿ï·¯ ÀÚ¹Ù½ºÅ©¸³Æ®¿¡¼­ ¾ÖÇø´ÀÇ º¯¼ö¿Í ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ´Â /^.^/ ¹æ¹ý¿¡ ´ëÇؼ­µµ ¾Ë¾Æº¸µµ·Ï ÇÏ°Ú½À´Ï´Ù. ¹°·Ð ÀÚ¹Ù½ºÅ©¸³Æ®¿¡ ´ëÇÑ ±âº» Áö½ÄÀÌ ÀÖ´Ù¸é ´õÇÒ ³ªÀ§ ¾ø°ÚÁö¸¸, ÀÌ °­Á¿¡¼­ ³ª¿À´Â ¿¹Á¦·Îµµ ÃæºÐÈ÷ Áö±Ý ȤÀº ÀÌÈÄ¿¡¶óµµ À¯¿ëÇÏ°Ô ½á¸ÔÀ¸½Ç ¼ö ÀÖÀ¸½Ç °Ì´Ï´Ù.

1. Java applet »ç¿ë °³¿ä

2. JavaScript »ç¿ë ¿¹

3. netscape.zip¿Í Ŭ·¡½ºÆнº ¼³Á¤¹ý

4. ¾ÖÇø´¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ® È£ÃâÇϱâ

5. ½ÇÁ¦ ÀÌ¿ë

6. Âü°í»çÀÌÆ®

7. ´ý: ¾ÖÇø´ÀÌ ¾Æ´Ñ ¾ÖÇø®ÄÉÀ̼ǿ¡¼­ ºê¶ó¿ìÀú ¶ç¿ì±â

1. Java applet »ç¿ë °³¿ä

´Ù ¾Æ½Ã´Â ³»¿ëÀÌÁö¸¸, applet À» ·ÎµùÇϱâ À§Çؼ­´Â

<html>

<head>

<title>applet</title>

</head>

<body>

<applet id="test" width="300" height="500" code="test.class" codebase=".">

<param name="name1" value="value1">

</applet>

</body>

</html>

ÀÌ·¯ÇÑ ³»¿ëÀÇ html¹®¼­°¡ ÇÊ¿äÇÕ´Ï´Ù.

   id´Â ÀÌ appletÀÇ identifier°¡ µÇ°Ú½À´Ï´Ù. width¿Í height´Â º¸¿©Áö´Â appletÀÇ °¡·Î, ¼¼·Îpixel°ªÀÌ°í code´Â óÀ½¿¡ ·ÎµùµÉ classÆÄÀÏÀ̸ç, codebase´Â ·ÎµùµÉ urlÀÔ´Ï´Ù. <¿¹: http://211.47.65.69> ÀÌ ¿Ü¿¡ jarÆÄÀÏ·Î ¾ÐÃàÇϼ̴ٸé archive="test.jar" ¼Ó¼ºÀÌ Ãß°¡µÇ¸é µÉ °ÍÀÔ´Ï´Ù. ±×¸®°í Ȥ½Ã applet°ú javascript¿ÍÀÇ Åë½ÅÀÌ ¾ÈµÉ °æ¿ì ¾Æ·¡Ã³·³ MAYSCRIPT¶ó´Â ¼Ó¼ºÀ» Ãß°¡½ÃÄÑÁÖ½Ã¸é µÉ °ÍÀÔ´Ï´Ù.

<applet id="test" width="300" height="500" code="test.class" codebase="." MAYSCRIPT>

2. JavaScript »ç¿ë ¿¹

<script language=Javascript>

function scriptTest(Mode){

document.test.methodOfTest(Mode);

//document.applets[0].methodOfTest(Mode);}

</script>

  º¸¼¼¿ä.

ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ ¸ð¸£½Ã´õ¶óµµ ÀÚ¹ÙÀÇ °´Ã¼ ¸ðµ¨À» ´ë·« ¾Æ½Å´Ù¸é ÀÌÇØÇϱ⠾î·ÆÁö ¾ÊÀ¸½ÃÁÒ? scriptÀÇ language¸¦ Javascript·Î Á¤ÇÏ°í, function scriptTest(Mode) ¸¦ È£ÃâÇÏ´Â ºÎºÐÀÔ´Ï´Ù. document´Â window.document·Î ÇöÀç ºê¶ó¿ìÀúÀÇ ¹®¼­ ºÎºÐÀ» ³ªÅ¸³»´Â °´Ã¼ÀÌ°í, ±× ¾È¿¡ test·Î identifyµÈ applet¿¡ Á¢±ÙÇϸç, ±× ¾ÈÀÇ methodOfTest¶ó´Â method¿¡ Á¢±ÙÇÕ´Ï´Ù. ¹°·Ð ÀÌ ¸Þ¼Òµå´Â publicÀ¸·Î µÇ¾îÀÖ¾î¾ß ÇÕ´Ï´Ù. º¯¼öµµ ¸¶Âù°¡Áö°ÚÁö¿ä. //·Î ÁÖ¼®Ã³¸® µÇ¾îÀÖ´Â ºÎºÐÀº ¹Ù·Î À­ ÁÙ°ú °°Àº È¿°ú¸¦ °®´Â ¹®ÀåÀÔ´Ï´Ù. appletÀº applets[] ¹è¿­·Î ÀÌ¹Ì ¼±¾ðµÇ¾î ÀÖÀ¸¹Ç·Î id¸¦ ÀÌ¿ëÇÏ´Â ´ë½Å applets[0], applets[1] µîÀ» ÀÌ¿ëÇصµ µË´Ï´Ù. applet¾ÈÀÇ methodOfTest°¡ ¸®ÅÏ°ªÀ» °®°í ÀÖ´Ù¸é À̸¦ º¯¼ö·Î ¹Þ¾Æ »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù.

3. netscape.zip¿Í Ŭ·¡½ºÆнº ¼³Á¤¹ý

À§ ¾ÐÃàÆÄÀÏÀº Java packages for LiveConnectÀÔ´Ï´Ù. ¿ì¸®´Â ÀÌ Áß¿¡¼­ netscape.javascript.JSObjectŬ·¡½º¿Í netscape.javascript.JSException Ŭ·¡½º¸¦ »ç¿ëÇØ ¾ÖÇø´¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇϵµ·Ï ÇÒ °ÍÀÔ´Ï´Ù.JSObjectÀº original JavaScript object·Î convertingµÉ °ÍÀÔ´Ï´Ù. À§ ÆÄÀÏÀ» ¿ì¼± Àû´çÇÑ µð·ºÅ丮·Î ´Ù¿î·Îµå ¹ÞÀ¸¼¼¿ä.

ÀÌÁ¦ Ŭ·¡½ºÆнº¿¡ Ãß°¡½ÃÄÑÁÖ¾î¾ß ÇÕ´Ï´Ù.

ÇöÀç Ŭ·¡½ºÆнº°¡ ÀâÇôÀÖ´Â °÷¿¡ ´Ù¿î·ÎµåÇÑ µð·ºÅ丮/netscape.zipÀ» Ãß°¡ÇϽñ⠹ٶø´Ï´Ù. À©µµ 2000¿¡¼­´Â ³»ÄÄÇ»ÅÍ ¿À¸¥ÂÊŬ¸¯ µî·ÏÁ¤º¸ ȯ°æº¯¼ö¿¡¼­ classpath¸¦ Ãß°¡ÇÏ½Ã¸é µÇ°Ú°í¿ä. ³ª¸ÓÁö À©µµ ½Ã¸®Áî¿¡¼­´Â autoexec.batÀ» Á÷Á¢ °íÄ¡½Ã¸é µÇ°Ú½À´Ï´Ù. linux µî À¯´Ð½º °è¿­Àº .profile °°Àº ½©À» °íÃÄÁֽðí¿ä... ÀÚ¼¼ÇÑ »çÇ×Àº À¥µ¶½ºÀÇ ±è¼¼°ï´ÔÀÇ ¹®¼­¸¦ ÂüÁ¶Çϼ¼¿ä. Ŭ·¡½ºÆнº¼³Á¤ÀÌ Á¤È®È÷ µÇ¾ú´Â Áö ¾Ë¾Æº¸±â À§ÇØ javaÆÄÀÏÀ» Çϳª »ý¼ºÇÑ ÈÄ, import netscape.javascript.JSObject;¸¦ Ãß°¡ÇÑ ÈÄ ÄÄÆÄÀÏÇغ¾½Ã´Ù. ÄÄÆÄÀÏÀÌ ¿¡·¯¾øÀÌ µÈ´Ù¸é Ŭ·¡½ºÆнº°¡ Á¦´ë·Î ÀâÈù °ÍÀÔ´Ï´Ù.

4. ¾ÖÇø´¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ® È£ÃâÇϱâ

Ŭ·¡½ºÆнº°¡ Á¦´ë·Î ÀâÇû³ª¿ä? À½ÈÄÈÄ /^.^/ °¨Ãàµå¸®¿É´Ï´Ù. ÀÌÁ¦ ½ÇÁ¦·Î »ç¿ëÇϱâ À§Çؼ­ JSObjectŬ·¡½º¿¡ ÀÖ´Â ¸Þ¼Òµå¸¦ »ìÆ캾´Ï´Ù.

public static JSObject getWindow (Applet applet )

À½ À©µµ °´Ã¼¸¦ ¹Þ¾Æ¿É´Ï´Ù. °¡Àå ¸ÕÀú È£ÃâÇؾßÇÒ ¸Þ¼ÒµåÁö¿ä.

»ç¿ë ¿¹: JSObject MainWindow = JSObject.getWindow ( this );

public Object call ( String methodName, Object args[ ] )

javascriptÀÇ ÇÔ¼ö¸¦ È£ÃâÇÕ´Ï´Ù. µÚÀÇ °´Ã¼¹è¿­Àº ÇÔ¼öÈ£Ã⠽à ÇÊ¿äÇÑ ÀÎÀÚ°¡ µÇ°Ú½À´Ï´Ù. ÀϹÝÀûÀ¸·Î ½ºÆ®¸µ ¹è¿­À» ¸¹ÀÌ »ç¿ëÇÕ´Ï´Ù. ÀÚ¹Ù½ºÅ©¸³Æ®´Â º¯¼öÇüÀÌ µû·Î ¾øÁö¿ä. ¸ðµÎ varŸÀÔ.

»ç¿ë ¿¹:

JSObject window = JSObject.getWindow(this);

String as1[] = {
strcode, strname
};

window.call("ChangeCode", as1);

ÀÌ·¯¸é ChangeCode(strcode, strname)À̶ó´Â ÀÚ¹Ù½ºÅ©¸³Æ® functionÀ» È£ÃâÇÑ ¼ÀÀÌ µË´Ï´Ù.

public Object eval ( String s )

ÀÌ ¸Þ¼Òµå´Â JavaScriptÀÇ expressionÀ» ¹Þ¾Æ¿À´Â ¸Þ¼ÒµåÀÔ´Ï´Ù.

»ç¿ë ¿¹:

JSObject MainWindow = JSObject.getWindow ( this );

JSObject UserName = MainWin.eval ( "document.UserInfoForm.UserName" );

UserName¿¡ ºê¶ó¿ìÀúÀÇ document.UserInfoForm.UserName °´Ã¼°¡ ´ëÀԵ˴ϴÙ.

public Object getMember ( String name )

»ç¿ë ¿¹:

JSObject MainWindow = JSObject.getWindow ( this );

JSObject DocumentPage = (JSObject)MainWindow.getMember ( "document" );

ÀÌ·¸°Ô ÇÑ ´Ü°è ¾Æ·¡ÀÇ °´Ã¼¿¡ Á¢±ÙÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. Á÷Á¢ eval¸Þ¼Òµå¸¦ »ç¿ëÇصµ µÇ°ÚÁö¿ä.

public Object getSlot ( int index)

SlotÀº °´Ã¼ À̸§À¸·Î ºÒ·¯¿À´Â °ÍÀÌ ¾Æ´Ï¶ó index·Î ºÒ·¯¿Ã ¶§ »ç¿ëÇÕ´Ï´Ù.

»ç¿ë ¿¹:

Object theApplet = Applets.getSlot ( index );

±× ¿Ü¿¡ removeMember, setMember, setSlot, toString µîÀÇ ¸Þ¼Òµå°¡ ÀÖ½À´Ï´Ù.

5. ½ÇÁ¦ ÀÌ¿ë

  ÀÚ, °øºÎÇÏ´À¶ó Èûµå¼Ì½À´Ï´Ù. ³¯µµ ´õ¿îµ¥...(ÀÌ ±Û º¸½Ç ¶© Ãß¿ï Áöµµ..) ±×·¡µµ ÀÌ·¸°Ô LIVECONNECTION¿¡ ´ëÇØ Çѱ۷Π¼³¸íÇÑ ¹®¼­°¡ ¾ø´õ¶ó±¸¿ä... ¸¹ÀÌ µµ¿òµÇ¼ÌÀ¸¸é ÁÁ°Ú½À´Ï´Ù.

ù ¹ø° ¿¹Á¦ ³ª°©´Ï´Ù.

[JAVA APPLET] import java.applet.*;
import java.awt.*;

public class JavaChrono extends Applet {
String previousTime = "0" ;
String currentTime = "0";
long j,k, l;
boolean okToChrono = false;
Color b, f;

public void init() {
b = getBackground();
f = getForeground();
MyThread tm = new MyThread(this);
tm.start();
}

public void startChrono() {
j = System.currentTimeMillis();
okToChrono = true;
}

public void stopChrono() {
okToChrono = false;
}

public void paint(Graphics g) {
if (okToChrono) {
g.setColor(b);
g.drawString(previousTime,10,30);
g.setColor(f);
k = System.currentTimeMillis();
l = k-j;
currentTime = Long.toString(l/1000);
g.drawString(currentTime,10,30);
previousTime = currentTime;
}
}
}

class MyThread extends Thread {
JavaChrono theApplet;

public MyThread(JavaChrono a) {
theApplet = a;
}

public void run() {
while (true) {
try {
theApplet.repaint();
this.sleep(1000);
}
catch(InterruptedException e) { }
}
}
}

[HTML] <HTML><HEAD></HEAD><BODY>
<APPLET CODE=JavaChrono.class
WIDTH=150
HEIGHT=150>
</APPLET>
<A HREF=""
onMouseOver="document.applets[0].startChrono()"
onMouseOut="document.applets[0].stopChrono()" >
<IMG SRC="whatever.gif" WIDTH=100 HEIGHT=100>
</A>
</BODY></HTML>

 

´«Ä¡ºü¸£½Å ºÐÀº ´Ù ÀÌÇØÇϼ̰ڽÀ´Ï´Ù¸¸, º¸½Ã¸é À̹ÌÁö¿¡ ¸¶¿ì½º¸¦ ¿Ã¸®¸é applets[0](¾ÖÇø´ÀÌ Çϳª ¹Û¿¡ ¾øÀ¸´Ï 0¹øÀÌ°ÚÁÒ.) ÀÌ ¾ÖÇø´ÀÇ startChrono()¸Þ¼Òµå°¡ È£ÃâµÇ°í ¸¶¿ì½º¸¦ »©¸é stopChrono() ¸Þ¼Òµå°¡ È£ÃâµÇ´Â °ÍÀÌÁÒ. startChrono()´Â ¾ÖÇø´¾ÈÀÇ okToChrono¸¦ true ·Î ¸¸µé°í, ½º·¹µå µ¹¾Æ°¡°í µîµîµî ¾î·ÆÁö ¾ÊÁö¿ä? Á» ´õ ÀÀ¿ëÇØ º¼±î¿ä?

<HTML>
<HEAD></HEAD>
<BODY>
<APPLET NAME="myApplet" CODE="MyApplet.class" HEIGHT=1 WIDTH=1></APPLET>
<FORM>
<INPUT TYPE="button"
VALUE="Start the Applet"
onClick="if (document.applets[0].isActive()) document.myApplet.showFrame()" >
<INPUT TYPE="button"
VALUE="Stop the Applet"
onClick="if (document.applets[0].isActive()) document.myApplet.disposeFrame()" >
</FORM></BODY></HTML>

[JAVA APPLET] import java.applet.*;
import java.awt.*;

public class MyApplet extends Applet {
Frame f = null;

public void init() { }

public void showFrame() {
if (f == null) {
f = new Frame();
f.setSize(100,100);
f.add(new Label("Hello World"));
f.setVisible(true);
}
}

public void disposeFrame() {
if (f != null) {
f.dispose();
f = null;
}
}
}

 

À̹ø¿£ ´ë¹üÇÏ°Ô applets¾ÈÀÇ ¸Þ¼ÒµåÀÇ ¸®ÅÏ°ªµµ ¹Þ¾Æ ÀÌ °ªÀÌ falseÀ̸é FrameÀ» ¿­°í, trueÀ̸é FrameÀ» ´Ý°í ÇÏ´Â ¾ÖÇø´À̱º¿ä. È÷¾ß... Á÷Á¢ Çغ¸½Ç·¡¿ä? ½ÃµµÇϱâ

À̹ø¿£..

<HTML><HEAD></HEAD><BODY>
<SCRIPT>
function JavaSays() {
alert("Java says\n the value of iJava is :" +
document.myApplet.getIntJava() + "\n" +
"and sJava is :" +
document.myApplet.getStringJava());
}
</SCRIPT>
<FORM>
<INPUT type="button" value="Java says"
onClick = "JavaSays();">
</FORM>
<APPLET CODE="inJava.class"
NAME="myApplet"
HEIGHT=0 WIDTH=0>
</APPLET></BODY></HTML>

import java.awt.*;
import java.applet.*;
public class inJava extends Applet{
public int iJava = 123;
public String sJava = "String from JAVA";

public int getIntJava() {
return iJava;
}
public String getStringJava() {
return sJava;
}
}

 

À½, À̹ø¿£ ¸Þ¼Òµå°¡ ¾Æ´Ï¶ó ÀÚ¹Ù ¾ÖÇø´ÀÇ º¯¼ö¿¡ Á¢±ÙÇÏ´Â ¹æ¹ýÀ» º¸ÀÌ°í ÀÖ½À´Ï´Ù. º¯¼ö¿Í ¸Þ¼Òµå°¡ ¸ðµÎ publicÀ¸·Î ¼±¾ðÀÌ µÇ¾îÀִµ¥¿ä. À½, publicº¯¼ö¿¡ Á÷Á¢ Á¢±ÙÇÏ´Â °Ç ¾ÈµÇ³ª?(°´Ã¼ÁöÇâ¿¡´Â ÁÁÁö¾ÊÀº ÄÚµù¹ýÀÌÁö¸¸...) ¼÷Á¦·Î ÇÑ ¹ø Çغ¸½ÃÁÒ. /^.^/

[Java applet] import java.applet.*;
import java.net.*;

public class inJava extends Applet{
public void init(){
String msg = "We will jump to an HTML tag";
try {
getAppletContext().showDocument
(new URL("javascript:doAlert(\"" + msg +"\")"));
getAppletContext().showDocument
(new URL("javascript:jumpTo(\"#JUMP\")"));
}
catch (MalformedURLException me) { }
}
}

[Javascript and HTML] <HTML><HEAD></HEAD><BODY>
<SCRIPT>
function doAlert(s) {
alert(s);
}
function jumpTo(tag) {
self.location=tag;
}
</SCRIPT>
<APPLET CODE="inJava.class"
NAME="myApplet" MAYSCRIPT
HEIGHT=400 WIDTH=10>
</APPLET>
<P>
<A NAME="JUMP">jump here from Java via Javascript</A>
</BODY>
</HTML>

 

À̹ø¿£ ¾ÖÇø´ ¾È¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ È£ÃâÇÏ´Â ¹ýÀ» º¸ÀÌ°í ÀÖ½À´Ï´Ù. È÷¾ß... ¿ì¸®°¡ ¿øÇÏ´ø °ÍÀ̱º¿ä. URLŬ·¡½º ¶§¹®¿¡ MalformedURLException ¸¦ try, catchÇØ ÁÖ°í Àֳ׿ä. ¾î ¿©±â¼­ ¿ì¿¬È÷ ÇÑ °¡Áö¸¦ ´õ °øºÎÇÏ½Ç ¼ö ÀÖ°Ô µÇ¾ú±º¿ä? ¹Ù·Î ¾ÖÇø´¿¡¼­ »õ·Î¿î urlÀÇ Ã¢À» ¿©´Â ¹æ¹ýÀÔ´Ï´Ù.

getAppletContext()·Î appletÀÇ Context°´Ã¼¸¦ ¹Þ¾Æ¿Â ÈÄ ¿©±â¿¡ showDocument¸¦ ÀÌ¿ëÇÏ°í ÀÖ½À´Ï´Ù. À½.. Á¦°¡ ¸¸µç äÆÿ¡ ¹è³Ê¸¦ Ŭ¸¯ÇÏ¸é ±× °÷ÀÌ ¿­¸®´Âµ¥, ¹Ù·Î ÀÌ ¹æ¹ýÀ» »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº Á¦°¡ ÁÁ¾ÆÇÏ´Â ¹Ú¿ë¿ì´ÔÀÇ °­Á¿¡ ¾ÖÇø´ ºÎºÐ¿¡ »ó¼¼È÷ ³ª¿Í ÀÖÀ¸¹Ç·Î Âü°íÇϼ¼¿ä.

ÀÚ, ³ª¸ÓÁö ¸òÀº ¿©·¯ºÐÀÇ °ÍÀÔ´Ï´Ù. ¿­½ÉÈ÷ °øºÎÇϽñ¸¿ä. ÀÚ¹Ù½ºÅ©¸³Æ®´Â ºê¶ó¿ìÀúÀÇ °¨ÃÊ·Î ¸¹Àº ÀÏÀ» client-side¿¡¼­ (¾î? Á¦ ȨÇÇ À̸§ÀÌ ÀÚ¹ÙSideÀε¥) Çس¾ ¼ö ÀÖÀ¸¹Ç·Î, ÀÚ¹Ù½ºÅ©¸³Æ® ¸ð¸£¸é ¹Ùº¸µÈ´Ù´Â ¸»µµ ÀÖÁö¿ä. ÀÌ Âü¿¡ ¶Ç °øºÎÇØ º¸¼¼¿ä.

Âü, À§ ¿¹Á¦µéÀº ¾Æ·¡ Âü°í»çÀÌÆ® Áß rgagnon.com¿¡¼­ ºô·Á¿ÔÀ½À»(¹¹ µµ·Î °±À» °Ç ¾Æ´ÏÁö¸¸..^^) ¸»¾¸µå¸³´Ï´Ù.

³¡!!!

6. Âü°í»çÀÌÆ®

http://developer.netscape.com/docs/manuals/communicator/jsref/pkg.htm

¡ãnetscapeÀÇ LIVECONNECTION¸Å´º¾óÀÔ´Ï´Ù.

http://www.codeproject.com

¡ã codeguruº¸´Ù ¿©±â°¡ ³´´Ù´Â ¼Ò¹®µµ..

http://www.rgagnon.com/howto.html

¡ã½ÇÁ¦ ÀÌ¿ë ¿¹Á¦¸¦ °øºÎÇÏ½Ç ¼ö ÀÖ´Â °÷ÀÔ´Ï´Ù.

ÇäÇä ÀÌ·¸°Ô Àý¶ó ÂøÇÑ ÀúÀÇ ¿­¶ó Ä£ÀýÇÑ °­Á¸¦ ³¡³À´Ï´Ù.

7. ´ý: ¾ÖÇø´ÀÌ ¾Æ´Ñ ¾ÖÇø®ÄÉÀ̼ǿ¡¼­ ºê¶ó¿ìÀú ¶ç¿ì±â

Runtime classÀÇ exec¸Þ¼Òµå¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÀÏ´Ü Windows 95/98 ¿¡¼­´Â

command.com /c start http://java.sun.com

Windows NT/2000 ¿¡¼­´Â

cmd.exe /c start http://java.sun.com

À» ½ÇÇàÇÏ¸é µÇÁö¿ä

¹¹.. Java°ü·Ã ÆÁÀ̶ó±âº¸´Ù´Â. Windows ÆÁÀ̶ó°í ºÁµµ µÇÁö¸¸¼­µÎ-_-

º¸Åë Java Application¿¡¼­´Â AppletÀÌ ¾Æ´Ï¶ó AppletContext¸¦ »ç¿ëÇÒ ¼ö

¾ø¾î¼­ Application¿¡¼­ ¶ç¿ì±â°¡ Á» ¾Ö¸ÅÇØÇϽô ºÐµéÀÌ ¸¹Áö¿ä

¹°·Ð Linux³ª Unix°è¿­¿¡¼­´Â netscape¸¦ º¸Åë »ç¿ëÇÏ½Ç Å×´Ï

netscape http://java.sun.com

À» ½ÇÇà½ÃÅ°½Ã¸é µË´Ï´Ù.

*** sample code ***

Runtime.getRuntime().exec(
new String[] { "cmd.exe", "/c", "start", "º¸¿©ÁÖ°í½ÍÀº URL" }
);

7¹ø, ´ý ±ÛÀº ³ª¿ì´©¸® windrath´ÔÀÇ ±ÛÀÔ´Ï´Ù. Àúµµ ±Ã±ÝÇØÇÏ´ø ¹®Á¦¿´À¸´Ï ¿©·¯ºÐ²²µµ µµ¿òÀÌ µÇ¸®¶ó ¹Ï½À´Ï´Ù.

¡Ø °­Á¿¡ ´ëÇÑ Áú¹®Àº '¹®ÀÇ°Ô½ÃÆÇ'¿¡¼­ ÇØÁÖ¼¼¿ä.