Im trying to run this piece of code
String test;
Document doc= null;
try {
doc = Jsoup.connect("http:\\thatsthefinger.com\\").get();
test=doc.title();
} catch (IOException e) {
e.printStackTrace();
out.setText(e.getMessage());
}
this is the execption im getting.
W/System.err: java.net.UnknownHostException: http:\thatsthefinger.com\
W/System.err: at com.android.okhttp.internal.http.HttpEngine.createAddress(HttpEngine.java:1143)
W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:323)
W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:249)
W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
W/System.err: at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:652)
W/System.err: at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:629)
W/System.err: at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:261)
W/System.err: at org.jsoup.helper.HttpConnection.get(HttpConnection.java:250)
W/System.err: at gplabs.szalpha.MainActivity$1.onClick(MainActivity.java:62)
W/System.err: at android.view.View.performClick(View.java:5207)
W/System.err: at android.view.View$PerformClick.run(View.java:21177)
W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5441)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
I searched everywhere and did everything i could, but couldn't solve. Anyone at least give me a working piece of code to it on my version of android studio, because i doubt my avm. Thanks in advance.