Joe Ess wrote:You didn't give us the exception stack trace, which is a vital piece of debugging information, but your problem sounds like this post
Thanks for your reply.
I am not enough familiar with the debugging process. So i would appreciate if you could provide me further information on how to carry out the following change: "...not to read using BufferedReader but one byte at a time and put the read in a try-catch for EOFException. ".
Eva Lin wrote:And how can I give you the exception stack trace?
Introduction to Java Stack Traces
Please, tell me what you mean when you talk about "I think the straight forward solution will be, not to read using BufferedReader but one byte at a time and put the read in a try-catch for EOFException."! And how can I give you the exception stack trace?
instead of using
where inputChar is declared as a int or a char.
I added the following command (i.e. ex.printStackTrace();) inside the catch block in order to show you the stack trace.
I really concern about the behavior of my application because the "stuck" comes from different urls in each execution...
Also, it is worth to notice that, after the installation of netBeans and the app-execution in a new machine, the app completed successfully!
But, this doesn't happen again! What the !@#$ is going on? How can I solve the bug?
Some guys told me about Thread.wait(1000); function but neither this worked out!
@Evan Caballero: can you explain with details what you mean?
Evan Caballero wrote:If the purpose of your application is to "download" pages over HTTP, you should take a look at HttpURLConnection. There are plenty of examples on the internet to show you how to use it.
Yes. This is actually what i want...
Do you mean a modification like this one:
Evan Caballero wrote:HttpURLConnection conn = (HttpURLConnection) x.openConnection(); is better I think ;)
To my knowledge, all the Java API HTTP/HTTPS classes use the same sun.* classes under the covers. If you have a problem with one, you'll have a problem with all.
this guy looks like he solved the problem by switching to the Apache HttpClient.