I had created a console application in which i was trying to create a socket connection with the server using
Java Class ServerConnect----
InetAddress hostIpAddress= fnGetHostInetAddress(domainName);
System.out.println(hostIpAddress.getHostAddress()+""+hostIpAddress.getHostName());
Socket socket = new Socket(hostIpAddress,43);
The console java application properly created the socket connection but...
When i tried to do the same thing through the Swing application i.e by giving call to the function of ServerConnect class for Socket Connection it did not work. When i tried to debug the Swing Application the control hanged at line
Socket socket = new Socket(hostIpAddress,43);
and did not move further, not even gave any exception.I am using netbeans IDE. The above code snippet is written in a function within a thread class ServerConnect which implements runnable interface whose run method gives call to that function.
call to start the thread is given in the actionPerformed method of a button.
Can anybody suggest what might be the problem/error.
Thanks