View Single Post
  #1 (permalink)  
Old 07-23-2007, 04:04 AM
tamayo tamayo is offline
Member
 
Join Date: Jul 2007
Posts: 4
tamayo is on a distinguished road
ConnectException not found
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

Code:
//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

Last edited by JavaBean : 07-23-2007 at 10:22 AM. Reason: Code placed inside [code] tag
Reply With Quote
Sponsored Links