cannot find symbol: ConnectException
hi, im really newbie in java, im writing a socket app and when i compile it i obtained the next error:
can't find the symbol: class ConnectException
The error is generated in the main.
I really don't undestand why is it, because I guess that the socket is correctly defined it, please can you help me? here is my code, thanks:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import javax.net.*;
import java.net.Socket;
public class sslcliente extends JFrame {
//declarando variables
Sesion sesion; //incluir este hilo
PrintStream prntextofuera;
BufferedReader rdrtextodentro;
Socket sktcliente;
...
...
...
public sslcliente ()
{
super ("sslcliente");
sktcliente=new Socket("localhost", 9000); //parametrizar
prntextofuera=new PrintStream(sktcliente.getOutputStream());
rdrtextodentro=new BufferedReader(new InputStreamReader(sktcliente.getInputStream()));
sesion=new Sesion(this);
sesion.start();
....
....
....
}//end of sscliente
public static void main(String[] args) throws IOException, ConnectException{
try{
sslcliente xcliente = new sslcliente();
xcliente.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}//fin de try
catch(Exception e){
JOptionPane.showMessageDialog(null,"Error al conectarse");
System.exit(0);
}//fin de catch
}//fin de del metodo main
}//fin de la superclase Jframe

