À±°æ±¸´Ô µµ¿ÍÁÖ¼¼¿ä. Áö³­¹ø System Command ´äº¯¿¡ ´ëÇØ ±ÞÈ÷ µµ¿ò ¿äû


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

±Û¾´ÀÌ :Jenny 1999³â 10¿ù 27ÀÏ 17:33:16

¾È³çÇϼ¼¿ä !! Áö³­¹ø ¾ÖÇø´¿¡¼­ telnetÀ» ½Ã½ºÅÛ Ä¿¸Çµå·Î »ç¿ëÇÒ¶§ ¾î¶»°Ô ÇؾßÇÒÁö Áú¹®Çß´øÀûÀÌ ÀÖ¾ú½À´Ï´Ù.
±×¶§ ´äº¯ÇØ ÁֽŠ¹æ¹ýÀ¸·Î showDocument("telnet://")À¸·Î ÈùÆ®¸¦ Áּż­ ½Ãµµ¸¦ Çغ¸¾Ò°Åµç¿ä.
Àú´Â ¼ÖÁ÷È÷ ÀÚ¹Ù¿¡ Ãʺ¸¶óÀε¥..ÇöÀç SNMP ÇÁ·ÎÅäÄÝ ±â¹Ý NMS¸¦ °³¹ßÇÏ°í Àְŵç¿ä.
»ç¿ëÇÏ´Â ÅøÀº SNMP Ŭ·¡½º¸¦ Á¦°øÇØ ÁÖ´Â ÅøÀε¥..
Àǵµ´Â ÀÌÀü ¿¡Çø´ È­¸é¿¡¼­ ¸î°¡Áö ÀԷ°ªÀ» ³Ñ°Ü ¹Þ¾Æ Çö È­¸éÀÌ ÇÁ·¹ÀÓ ÇüÅ·Π½ÇÇàµÇ°í
ÀÌ ÇÁ·¹ÀÓÀº ¸Þ´º¸¦ ±¸¼ºÇÏ°í ÀÖÁö¿ä. »ç¿ëÀÚ°¡ ÅÚ³ÝÀ̶õ ¸Þ´º¸¦ ¼±ÅÃÇϸé showDocument¸¦ »ç¿ëÇÏ¿© ÅÚ³ÝÀÌ ½ÇÇàµÇ°Ô²û
Çϴ°ÅÀÔ´Ï´Ù. À̶§ telnetÀÇ È£½ºÆ® ÁÖ¼Ò´Â ÀÌÀü È­¸é¿¡¼­ ÀÔ·Â ¹ÞÀº var_host °ªÀÌ ¿Í¾ß Çϱ¸¿ä.
±×·±µ¥ ÀÚ²Ù ¿¡·¯ ¸Þ¼¼Áö°¡ ¶ß³×¿ä. ¿¡·¯ ¸Þ¼¼Áö´Â ´ÙÀ½ °ú °°±¸¿ä..
ÇØ´ç Äڵ嵵 ÇÔ²² ÷ºÎÇÕ´Ï´Ù.
ÄÚµå´Â ±æÁö¸¸ Á¤ÀÛ ÇØ´çµÇ´Â ÄÚµå´Â menuListener Ŭ·¡½º ³»¿ë¿¡ ¹®Á¦°¡ Àִ°Š°°½À´Ï´Ù.
´ëºÎºÐÀº ÅøÀÌ ÀÚµ¿ÀûÀ¸·Î ¼Ò½º¸¦ »ý¼ºÇØ Áְŵç¿ä.


¹Ù»Ú½Ã°ÚÁö¸¸ µµ¿Í ÁÖ¼¼¿ä !!!!! Á¦ ÁÖÀ§¿¡ µµ¿òÀ» ûÇÒºÐÀÌ ¾ø¾î¿ä....ÈæÈæ....
Á¦°¡ ¿ö³« Ãʺ¸¶ó....¼­....½¬¿î ¹®Á¦ÀÏ°Å °°Àºµ¥..Àß ¸ð¸£°Ú³×¿ä...


Âü°í·Î ÄÚµå ºÎºÐÁß applet.getAppletContext.showDocument("telnet://"+url)À»
getAppletContext.showDocument("telnet://"+url) ·Î ÇÏ¸é ¿¡·¯ ¸Þ¼¼Áö´Â


"Undefined variable or class name: getAppletContext
getAppletContext.showDocument("telnet://" + url) ;" À̶ó°í ¶å´Ï´Ù.


ÀÌÀü ¿¡Çø´ È­¸é¿¡¼­ ÀÔ·Â °ªÀ» º¯¼ö var_host¿Í comm_Str¿¡ ÁÖ¸é Áö±Ý ÇÁ·Î±×·¥¿¡¼­´Â ±× Á¤º¸¸¦ °¡Áö°í¼­
ÅÚ³Ý ¸í·É ¼öÇà½Ã ºê¶ó¿ìÁ®¿¡ "telnet://var_host °ª" ÇüÅ·ΠURLÀÌ ³Ñ°ÜÁö±æ ¿øÇÏ´Â °Å°Åµç¿ä.


¿¡·¯ ¸Þ¼¼Áö :
Attempt to reference method getAppletContext in class java.applet.Applet as an instance variable.
applet.getAppletContext.showDocument("telnet://" + url) ;



==============================================================================


import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.lang.* ;
import java.net.* ;
import java.applet.Applet ;
public class menu extends JFrame
{
menuListener Listen = new menuListener() ;
String comm_Str=null;
String var_host = null;

private boolean initialized = false;


java.applet.Applet applet = null;


public menu()
{
this.setSize(375,400);
this.setTitle( " menu" );
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
public menu(java.applet.Applet applet)
{
this.setSize(375,400);
this.setTitle( " menu" );
this.applet = applet;
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}


public void init()
{
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception e) {}
if (initialized == true) return;
// Set the layout for the container
getContentPane().setLayout(null);
// let us set the initialzed variable to true so
// we dont initialize again even if init is called
initialized = true;


// Instantiate the beans and add them, if they are visible
//Instantiate JMenuBar1


JMenuBar1= new javax.swing.JMenuBar();
getContentPane().add(JMenuBar1);
JMenuBar1.setBounds(25,20,310,40);


//Instantiate port


port= new com.adventnet.netmonitor.SnmpStatusIcon(applet);
port.setLayout(null);
getContentPane().add(port);
port.setBounds(225,85,45,45);



//Set the Bean properties which have been modified.
setVisible(true) ;



javax.swing.JMenu file = new javax.swing.JMenu("File") ;
file.setMnemonic('F') ;
javax.swing.JMenuItem tel = new javax.swing.JMenuItem("Telnet") ;
tel.addActionListener(Listen) ;
file.add(tel) ;
JMenuBar1.add(file) ;
//Set the modified properties for port
try
{
port.setWriteCommunity("");
port.setCommunity(comm_Str);
port.setTargetHost(var_host);
}catch(Exception ex){};



//Setup the connections between the various Beans



// let us add the init code entered in the screen..

}


public void setVisible(boolean bl)
{
init();
super.setVisible(true);
}
private String getParameter(String input)
{
return "";
}
class menuListener implements ActionListener {

public void actionPerformed(ActionEvent evt) {
String command = evt.getActionCommand();

if(command.equals("Telnet")) {
String location=port.getTargetHost() ;
try {
URL url = new URL(location) ;
applet.getAppletContext.showDocument("telnet://" + url) ;
} catch(MalformedURLException e) { e.printStackTrace() ;}

}
}

}



//Declare the beans
javax.swing.JMenuBar JMenuBar1 = null;
com.adventnet.netmonitor.SnmpStatusIcon port = null;
}



´ÙÀ½ ±Ûµé:



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

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


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