LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2010, 03:45 AM   #1
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
java/netbeans and libcurl; don't understand how to get it to work


I'm writing a 'little' java app and need to retrieve the content of websites. As far as I understand, libcurl is basically the tool to use for this type of work.

Found a java binding (whatever that might be ) for libcurl on http://www.gknw.net/viewvc/trunk/?root=curl-java and downloaded/extracted the tarball.

And now I'm at a total loss how to continue.

I'm trying to import the 'library' in my java code (import net.saxx.curl.*) but netbeans complains that it can't find it. Tried adding different paths (possibly the wrong ones; e.g. F:\documents\_Downloads\java_stuff\curl-java-trunk\trunk) in netbeans but it still can't find it.

Code:
F:\documents\_Downloads\java_stuff>tree
Folder PATH listing for volume Data
Volume serial number is 0006EFC4 10D8:EA40
F:.
├───curl-java-trunk
│   └───trunk
│       └───net
│           └───haxx
│               └───curl
├───INIFileSrc
├───Java
└───javacsv
Although there are makefiles in the downloaded tarball, the README does not mention the use of them.

Not very familiar with the environment around java and I think that that is my problem.

Any advice is highly appreciated.

This is, by the way, on a Windows XP machine.
 
Old 10-13-2010, 08:30 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Q: which tarball did you save?
http://www.gknw.net/mirror/curl/curl_java/
<= Did you download curl-java-0.2.3.tar.gz?

Q: Did you build it?
<= as far as I can tell, it's source-only:
no Java .class files or .jar's

PS:
A Java "wrapper", as you can probably guess, is just a software layer that lets Java call functionality that happens to be written in another language.

Last edited by paulsm4; 10-13-2010 at 08:32 PM.
 
1 members found this post helpful.
Old 10-13-2010, 11:52 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
It's version 0.2.2 according to the README and the download link is http://www.gknw.net/viewvc/trunk/?ro...-java&view=tar

And no, I did not build it as the readme did not mention it.

Thanks for the reply, will start 'hunting' for MingW32 (and maybe cycwin if I need that).
 
Old 10-14-2010, 09:21 AM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Wim Sturkenboom View Post
I'm writing a 'little' java app and need to retrieve the content of websites. As far as I understand, libcurl is basically the tool to use for this type of work.
I think you might be better off using Java's builtin HttpURLConnection class.
 
1 members found this post helpful.
Old 10-15-2010, 11:40 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
You might very well be right. I will certainly consider after reading up as the current path is not without problems.

I've managed to install MinGW after some trouble (automated installer did not work correctly so it was manual downloads).
Now I'm taking little steps at a time compiling and fixing dependencies for the binding and got stuck again.

I only work on this project 3 days a week, so could not provide feedback yet.
 
Old 10-20-2010, 11:42 PM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Original Poster
Rep: Reputation: 282Reputation: 282Reputation: 282
Thanks all,

marked this one as solved as I'm now using the HttpURLConnection class

When I have time, I will try to get the libcurl binding going
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java + Netbeans installation error tm2383 Linux - Software 1 12-23-2007 08:04 AM
Netbeans for Java tm2383 Programming 3 10-14-2007 12:54 PM
java and netbeans 5.5 - 2 problems avallach Linux - Software 2 08-14-2007 07:35 AM
Installing Java and Netbeans Bundle oookiezooo Linux - Newbie 4 01-25-2006 05:21 PM
Adding a java module to netbeans Setheck Linux - Software 0 03-28-2005 09:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration