How to Fix the ‘Java.net.SocketException’ Error on a Minecraft Server

1. Open ‘CMD’ As Administrator

Button to open CMD as administrator

1.1. Enter the Command ipconfig /flushdns

This command will allow you to clear your PC’s DNS resolver cache, which removes old or corrupt IP address and domain name information to force the system to fetch updated data.

'ipconfig flushdns' command in the command prompt

1.2. Enter the Command ipconfig /release

This command will allow you to release the current IP address assigned to your computer by the DHCP server. This helps solve connectivity issues such as IP conflicts or when switching networks.

'ipconfig release' command in the command prompt

1.3. Enter the Command ipconfig /renew

This command will allow you to request and obtain a new IP address from a DHCP (Dynamic Host Configuration Protocol) server, releasing the previous one (ipconfig release).

'ipconfig renew' command in the command prompt

1.4. Enter the Command ipconfig /registerdns

This command will allow you to manually force the registration or update of your computer’s DNS records on the DNS server, updating its hostname and IP address.

'ipconfig registerdns' command in the command prompt

Then, close the CMD.


2Open the ‘View Network Connections’ Program

'View network connections' program outlined with arrow

2.1. Right-Click on the Wi-Fi Network You Are Connected To

Steps to open the properties menu of the selected connection

2.2. Select the ‘Properties’ Button


3. Open the ‘Properties’ of the ‘Internet Protocol Version (TCP/IPv4)’


3.1. Enter New DNS Addresses

Changing DNS addresses can improve internet connection speed and stability, enhancing page loading and preventing restrictions or blocks.

In ‘Preferred DNS’ enter the values: 8.8.8.8

In ‘Alternate DNS’ enter the values: 8.8.4.4

New DNS values ​​(TCP/IPv4)

Then, select the ‘OK’ button.


4. Restart Your PC

-> Optional Step

If you’re still getting the ‘Java.net.SocketException’ error, you can try fixing it by following these steps:

1. Open the ‘Control Panel’

'Control panel' window outlined with arrow

2. Select ‘Programs’

'Programs' section outlined with arrow

3. Select ‘Java’

'Java' program outlined with arrow

4. Select the ‘Update’ Tab

Java program 'update' tab

5. Select the ‘Update Now’ Button

This will automatically search for and update to the latest available version of Java, preventing compatibility issues.

Java program 'update now' button outlined with arrow

Then, select the ‘OK’ button.

-> Optional Step

If you’re still getting the ‘Java.net.SocketException’ error, you can try fixing it by following these steps:

1. Open Your PC Settings

'Settings' window outlined with arrow

2. Select the ‘Network & Internet’ Tab

'Network and internet' tab outlined with arrow

3. Select the ‘Advanced Network Settings’ Section

'Advanced network settings' section outlined with arrow

4. Select the ‘Network Reset’ Section

'Network reset' section outlined with arrow

5. Select the ‘Reset Now’ Button

'Reset now' button outlined with arrow

6. Restart Your PC

Minecraft Server Hosting

Starts at $1.99

External link icon
Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?
Table of Contents