Hi, I´m writing a socket app, when I try to compile it, i obtained the error in the main "can´t find the symbol"
Symbol: class ConnectException
But i don't get why I obtained that error, because when I define the socket it does not problem with that, so here is my code:
Thanks for your help
//THESE ARE MY IMPORTS
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 function
//THIS IS MY MAIN:
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
}//end of sslcliente jframe