Tuesday, August 30, 2011

Re: Url fetch

You can't use this class java.net.URL,  see JRE Emulation Refernce.

2011/8/30 Буяндалай <buya99999@gmail.com>
i run this code. it's error. i type what's wrong. Please help me.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
try {
       URL urlsearch = new URL("*insert website*");
       BufferedReader buffreader = new BufferedReader(
              new InputStreamReader(urlsearch.openStream()));
       String HTMLdisplay;
       while ((HTMLdisplay = buffreader.readLine()) != null) {
               System.out.println(HTMLdisplay);
       }
       buffreader.close();
} catch (MalformedURLException e) {
} catch (IOException e) {
}

error is:
               [ERROR] [exam] - Line 52: No source code is available for type
java.net.URL; did you forget to inherit a required module?
               [ERROR] [exam] - Line 53: No source code is available for type
java.io.BufferedReader; did you forget to inherit a required module?
               [ERROR] [exam] - Line 54: No source code is available for type
java.io.InputStreamReader; did you forget to inherit a required
module?
               [ERROR] [exam] - Line 60: No source code is available for type
java.net.MalformedURLException; did you forget to inherit a required
module?
               [ERROR] [exam] - Line 95: No source code is available for type
java.net.HttpURLConnection; did you forget to inherit a required
module?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment