hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Murray <gmur...@Mines.EDU>
Subject Re: HttpClient won't run in Swing JUnit
Date Thu, 14 Jul 2005 17:37:10 GMT
On Wed, 13 Jul 2005, Michael Becke wrote:
> Hi Glenn,
>
> Don't know, that's a weird one.  My first reaction is that it's just a
> coincidence and has nothing to do with the presence (or lack) of
> HttpClient.
>
> Mike

Hi,

This is an easy bug to reproduce:

javac -classpath .:commons-httpclient-2.0.2.jar:junit_3.8.1.jar HttpClientBug.java

java -cp .:commons-httpclient-2.0.2.jar:commons-logging.jar:junit_3.8.1.jar junit.textui.TestRunner
HttpClientBug

java -cp .:commons-httpclient-2.0.2.jar:commons-logging.jar:junit_3.8.1.jar junit.swingui.TestRunner
HttpClientBug

I've verified it on Linux and WinXP with Java 1.5.

Part of the mystery is that commons-logging.jar need not
be in the classpath when I compile.  Also, the
ExceptionInInitializerError won't get printed.

Thanks,
Glenn


import junit.framework.TestCase;
import org.apache.commons.httpclient.HttpClient;
public class HttpClientBug  extends TestCase {
   public void testIt() {
        try{
            System.out.println("Yo, "+System.getProperty("user.name")+"!");
            HttpClient client = new HttpClient();
        }catch(Exception e) {
            e.printStackTrace();
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message