cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: using libcurl with java on linux

From: Lai, Andy <hlai_at_informatica.com>
Date: Thu, 14 Jul 2005 14:05:39 -0700

I'm currently working on libcurl in the JNI context...
My suggestion is do not use JNI unless you have no other option. There are decent HTTP supports from
base java SE and apache.

*IF* JNI is really your only option, using libcurl is no different from calling any other C functions from java. Simply define native functions in your java class, built the C interfaces and make sure you native library is loaded in your java class.

Thanks,
Andy

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se]On Behalf Of Jeph
Sent: Thursday, July 14, 2005 1:19 PM
To: curl-library_at_cool.haxx.se
Subject: using libcurl with java on linux

Hello everyone,

I have been trying to get linbcurl working with java on linux for a
while now, and
have had no success. I tried searching through the mailing list and
could find nothing which helps me, so I was wondering if anyone could
point me in the right direction.

I found Javacurl (http://sourceforge.net/projects/javacurl) which of
course is linked directly from the java section of the libcurl page,
but it seems to be very windows-centric. The extension includes (and
imports in the java code) several windows DLLs.

When I import the eclipse plugin and the included test project, and
try to run it, I get an error saying "Critical libraries couldn't be
loaded" which occurs in CurlGlue.java where the windows libraries are
loaded.

So, can I bypass that eclipse project and just use the JNI? If so,
how? I couldn't find any documentation? Or is there a better way?

Thanks in advance for any help!

Jeff Theroux
Received on 2005-07-14