Path: news.mathworks.com!not-for-mail
From: "Michele " <denber.nospam@mindspringNOSPAM.com>
Newsgroups: comp.soft-sys.matlab
Subject: urlread timeout
Date: Sun, 2 Mar 2008 01:45:04 +0000 (UTC)
Organization: Michele Denber (ID: 1-A7A3B)
Lines: 27
Message-ID: <fqd0qv$iti$1@fred.mathworks.com>
Reply-To: "Michele " <denber.nospam@mindspringNOSPAM.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204422304 19378 172.30.248.37 (2 Mar 2008 01:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 2 Mar 2008 01:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 174773
Xref: news.mathworks.com comp.soft-sys.matlab:454804


urlread has a serious problem, at least in R13, in that if
the url you're trying to read doesn't answer, urlread just
hangs without returning an error.  In fact the only way to
regain control is to open the process manager and kill Matlab.

I tried Fu-Sung Wang's urlread2 which claims to fix this but
it generates the following error:

img = urlread2('http://192.168.0.107/image.jpg', [], [], 5);
??? Undefined variable 'com' or class
'com.mathworks.mlwidgets.html.HTMLPrefs.setProxySettings'.

Error in ==> C:\matlab\toolbox\matlab\iofun\urlread2.m
On line 41  ==>
com.mathworks.mlwidgets.html.HTMLPrefs.setProxySettings

I tried saying

com.mathworks.services.Prefs.setStringPref('HelpSelectedProducts','MATLAB');

and then restarting Matlab as suggested in another post, but
that had no effect.

The author isn't answering his email and I'm really stuck. 
Does anyone have a way to read web pages without hanging if
the url is down?  Any help would be greatly appreciated. 
Thanks.