How to Fix java.net.ConnectException: Connection refused: connect in Java

java.net.ConnectException: Connection refused: connect is one of the most common networking exception in Java. This error comes when you are working with client-server architecture and trying to make TCP connection from client to server. Though this is not as cryptic as java.lang.OutOfMemoryError: Java heap Space or java.lang.UnsupportedClassVersionError, it’s still a frequent problem in distributed Java applications. java.net.ConnectException: Connection refused: connect also comes in case of RMI (Remote Method Invocation), because RMI also use TCP IP protocol underneath. While writing client socket code in Java, You should always provide proper handling of this exception. In this Java tutorial, we will see why connection refused exception comes and how to solve java.net.ConnectException: Connection refused: connect Exception in Java.
Read more »

0 Response to "How to Fix java.net.ConnectException: Connection refused: connect in Java"

Posting Komentar