| Summary: | OpenStream Method doesn't work! | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Moon-su Kim <akaihana430> |
| Component: | APT | Assignee: | Generic inbox for the JDT-APT component <jdt-apt-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | eclipse |
| Version: | 3.8.2 | ||
| Target Milestone: | 2.0 M1 | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Eclipse just launches your program in whatever JRE you tell it to. If you are getting different behavior at the command line than in Eclipse, you are probably using a different JRE. For assistance with using Eclipse, please use the Eclipse discussion forums, not the bug database. |
-- Configuration Details -- Product: Eclipse 1.5.2.20130110-1126 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.jdt 3.8.2.v20130116-090414-8-8nFu3FNOfwKLRuqgXKIy9z0I83 My codes are below When i launch this at Command Prompt. it works fine.. but it does not work at eclipse. this throws me NumberFormatException.. How to solve it? import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; public class URLMain { public static void main(String[] args) throws Exception { URL url = new URL("http://www.daum.net"); System.out.println(url); InputStream is = url.openStream(); InputStreamReader isr = new InputStreamReader(is); while(true){ int readCh = isr.read(); if(readCh == -1){ break; } System.out.print((char)readCh); } } }