J ai developpé un FTP client serveur.
J ai une erreur que je n arrive pas a resoudre :
JFrame.java [171:1] unreported exception java.net.UnknownHostException; must be caught or declared to be thrown
InetAddress addr = InetAddress.getByName("localhost");
JFrame.java [172:1] unreported exception java.io.IOException; must be caught or declared to be thrown
Socket soc = new Socket(addr, 5217);
Je pensais qu il fallait juste mettre ds la déclaration du main "throws Exception" mais ca ne change rien.
Que faire
Merci par avance,
Titie
A voir également:
Unreported exception unknownhostexception; must be caught or declared to be thrown
Caught compilation - Meilleures réponses
Unreported exception ioexception; must be caught or declared to be thrown - Meilleures réponses