parsing - Java URL reader throwing IO Exception when reading special character -


i'm having problem reading json of url, when input has character "é" (alt130). strange part program works when launched within netbeans ide, doesn't when launched distribution jar. here's code i'm using:

public class urlreader { private url url; private bufferedreader in; private string inputline;  public void gettextfromurl(string address) {     try {         url = new url(address);         gui.textarea.append("url created\n");         in = new bufferedreader(new inputstreamreader(url.openstream(),"utf-8"));         gui.textarea.append("buffered reader created\n");         while((inputline = in.readline()) != null)             gui.textarea.append(inputline+"\n");         in.close();     } catch (ioexception ex) {         gui.textarea.append("io exception");     } } 

the output when program launched within netbeans ide following:

enter image description here

however when launch program dist jar, output this:

enter image description here

the url object seems created fine, bufferedreader seems throw ioexception. wrong?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -