I'm making a TCP Client in Applet mode and I get this strange error...
C:\Users\Dan\Documents\DanJavaGen\ClientApplet.java:20: cannot find symbol
symbol : method printStrackTrace()
location: class java.lang.Exception
e.printStrackTrace();
^
1 error
Tool completed with exit code 1
teh code:
import java.io.*;
import java.applet.Applet;
import java.net.*;
import java.awt.*;
import java.util.*;
public class ClientApplet extends Applet {
public void init() {
Socket s = null;
try {
//s = new Socket(getParameter("host"), Integer.valueOf(getParameter("port")));
s = new Socket("localhost", 4444);
InputStream in = s.getInputStream();
int buf = -1;
while ((buf = in.read()) != '.') {
System.out.print((char)buf);
}
}catch(Exception e) {
e.printStrackTrace();
}
finally {
try {
s.close();
} catch(IOException e)
{ }
}
}
}
What's the deal?