• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a telnet client applet

 
Tony Turner
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am attempting to create an applet that creates a telnet connection to a remote host. I am using the open source code from apache.org.commons.net
I am unable to compile, since the compiler does not recognise the connect method of TelnetClient.
Would anyone have any ideas?
The snippet of code is below
import org.apache.commons.net.telnet.*;
import org.apache.commons.net.*;
import java.io.*;
import java.applet.Applet;
import java.awt.Graphics;
import java.net.*;

public class TelnetSample extends Applet
{
private TelnetClient tn = new TelnetClient();
private InputStream in;
private PrintStream out;
private char prompt = '$';
String hoststr = "161";
int port = 23;
String emstr ="";
tn.connect(hoststr,port, emstr);
}
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the command line you are using to compile. Sounds like you don't have the Telnet classes on your classpath when compiling.
brian
[ January 13, 2004: Message edited by: Brian Pipa ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic