How to handle socket Exception
Sir i am running this code on windows vista, but i am getting the Socket Exception: Permission Denied:: Listen failed.I am trying to run this application on port 8080.On this very port i am running tomcat6.0,so even when i changed the port same exception arises.
Similar Exceptions were there when i run tomcat6.0 but when i installed tomcat6.0 as a service it worked fine.
So, please sir what should i do run this code on my machine.
I have Java SE(TM)Run Time Environment6 running, also mcafee antivirus running.Please post me a solution if possible
public class SocketTest
* @param args
public static void main(String args)
myService = new ServerSocket(8080);
System.out.println("successfully opened a socket");
catch (IOException e)
Might be the prolem with the IDE
If you are using eclipse IDE or a similar one exit from the IDE and try running the code again.