MATLAB: URLREAD command/ JAVA networking not working on Debian system

MATLAB

Why does URLREAD command or any command using JAVA networking not work on the Debian 6.0 system. Executing these commands returns the following error:
??? Error using ==> urlread at 111
Error downloading URL. Your network connection may be down or your proxy
settings improperly configured.

Best Answer

This is a known issue of Java networking on the recent Debian releases. This is due to ipv6 configuration and can be resolved by disabling ipv6.
Following is a work-around for this issue:
To disable ipv6 execute the following commands in the Linux terminal:
sudo gedit /etc/sysctl.d/bindv6only.conf
This will open the bindv6only.conf file in an editor. Now change
net.ipv6.bindv6only = 1
to
net.ipv6.bindv6only = 0
Save and close the file.
Now, run the following in the Linux terminal:
sudo invoke-rc.d procps restart
This should resolve this issue.
Detailed description of this procedure can be found in the following link: