Code file here:
Code error here:
http://imageshack.us/f/152/erroriojava.png/
I don't know why happens that.
Code file here:
Code error here:
http://imageshack.us/f/152/erroriojava.png/
I don't know why happens that.
Java has 2 types of exceptions: checked and unchecked. Checked exceptions require the programmer to handle them explicitly when a method may throw them. In your case, IOException is a checked exception, because it doesn't extend RuntimeException, and the accept method may throw it.
There are 2 ways to handle checked exceptions, just like the error message says: they can be caught (using a try..catch block) or declared to be thrown (using the throws keyword for your method). If you choose the 2nd option, then the caller of your method becomes responsible for handling the exception.
You can find a lot more details and examples if you search for java checked exceptions. Good luck!
At least, all errors included on your image are related to unreported exception
java.io.IOException
So, you should include try catch blocks for following lines or
throws IOException
from your methods
flujosES()
and
waitConexion()
Line 57 : printMensaje( "Conexión recibida de: " + conexion.getInetAddress().getHostName() );
Line 120: salida.flush();
line 121: entrada = new ObjectInputStream( conexion.getInputStream() );
Line 122: printMensaje( "\nSe recibieron los flujos de E/S\n" );