Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using curl in java

807605Aug 18 2007 — edited Sep 4 2007
Hi
i am using libcurl in java..i have downloaded all the source files(5) of libcurl & dll files(3).
placed them in Test Package & compile them..
all the dll s are loading fine

& created my own curl.java

package curlPackage;

import Test.*;

public class curl
{
public static void main(String[] args)
{
try
{
//System.loadLibrary("javacurl");
String url = "http://www.shaadi.com";
CURL c = new CURL();
CurlGlue cg = new CurlGlue();
cg.setopt(c.OPT_URL,url);
int result = cg.perform();
cg.finalize();
System.out.println("result:"+result);
}
catch(Exception e)
{
System.out.println("Exception:"+e);
}
}
}


but when i am trying to run this.
it is giving me the following error

Exception in thread "main" java.lang.UnsatisfiedLinkError: Test.CurlGlue.jni_init()I
at Test.CurlGlue.jni_init(Native Method)
at Test.CurlGlue.<init>(CurlGlue.java:59)
at curlPackage.curl.main(curl.java:14)
Java Result: 1


PLEASE HELP ME.....


& if anybody used javacurl please help me
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2007
Added on Aug 18 2007
9 comments
593 views