cURL / Mailing Lists / curl-library / Single Mail


Java & LibCurl Configuration?

From: Martin O'Rorke <>
Date: Fri, 4 Feb 2005 22:00:15 +0000

Hi guys, ok what I am trying to do is use LibCurl from a java program such as:

String params =
                        String url = "";
                        CurlGlue cg = new CurlGlue();
                        cg.setopt(cg, CURLOPT_URL, url);
                        cg.setopt(cg, CURLOPT_RETURNTRANSFER, true);
                        cg.setopt(cg, CURLOPT_FOLLOWLOCATION, true);
                        cg.setopt(cg, CURLOPT_POST,1);
                        cg.setopt(cg, CURLOPT_POSTFIELDS,params);
                        cg.setopt(cg, CURLOPT_HEADER, 1);
                        // cg.perform();
                        String response = cg.perform();

(This is the main snippet of my java program)

What I need to know how to do is install LibCurl on a Win32 machine
and what do I do with the java classes or the libcurl.jar file? When
I compile my program needless to say there is errors in finding
operations such as CURLOPT_RETURNTRANSFER etc etc.

Please could someone give me a good guide from the start on how to
install and configure Curl/LibCurl on Win32 then tie it in with the
Java side of things.

Any help on this is very much appreciated!

Received on 2005-02-04