Java with NNTP and MySQL

Hello,

I want to write a program in Java that has the ability to read from any NNTP server and their news groups. Read the posts, and put the attachments, if any, into the local drive. Then write a record indicating this has occurred.

Of course the program would be smart enough to detect which posts are new, only only read the new ones.

My problem is that there doesn't seem to be a easy to use NNTP class for Java.... Am I searching for the wrong thing?

the Java Mail API doesn't support this anymore, and project Knife is no longer active.

Please give me a hand....
LVL 6
SamsonChungAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrcoffee365Commented:
Have you looked at James, the NNTP and POP3 server from Apache?
http://james.apache.org/
0
SamsonChungAuthor Commented:
I don't own the NNTP server... nor am I hosting it..

I just want the ability to record dialogs and attachments on a News Server and put them into a DB.

0
mrcoffee365Commented:
Yes, so you want an application which will successfully read an nntp transmission.  The code for james is open source, so you can get the source and look at how they do it.  By reading the dialogs and attachments from an nntp server, you are performing the main tasks of an nntp server.

If you want to look at different examples, you can check the Mozilla open source browser code for reading the input stream from an nntp server -- but that's not in Java.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

mrcoffee365Commented:
Just searching for nntp and Java, I found this example of an NNTP client written in Java -- that's another way to get started.
http://www.devdaily.com/java/jwarehouse/commons-net-1.2.2/src/java/org/apache/commons/net/nntp/NNTPClient.java.shtml
0
Ajay-SinghCommented:
0
mrcoffee365Commented:
Ajay-Singh -- I agree, the gnu JavaMail seems like a reasonable possibility.  Sun's Java mail library has deprecated the nntp connection, as SamsonChung mentioned above.
0
SamsonChungAuthor Commented:
Mrcoffee,

I was reading that page.... it is a copy of the Apache's version, which requires a dozen of Apache specialized class files....

Sigh, I think I might have to write it completely on my own.
0
mrcoffee365Commented:
A lot of people do write their own custom reader of nntp.  If you think that your NNTP feed will be fairly standard, then it might not be bad to write your own feeder.

On the other hand, it seems a shame to reinvent the wheel, when all you have to do is get some Apache classes.  Totally up to you, of course.
0
SamsonChungAuthor Commented:
Hey Mr coffee,

I've decided to 'NOT' write my own NNTP client.. infact, I'll use the one you suggested. the Apache one..

I am not stuck at, locating the jar file for org.apache.commons.net

Is there a way I can do this without hunting down the java files? Like Via Eclipse?? Or a place for downloading the source to apache.

0
SamsonChungAuthor Commented:
remove not,

I am NOW stuck at....

0
mrcoffee365Commented:
I think it's a better idea to use apache code instead of writing your own.

You have to get the jars -- Eclipse doesn't know more than you do.

The way to find jars on the Web is to put "org.apache.commons.net" into Google, and follow the obvious links.  I did that and the first link was to the change notes page for Apache Commons/Net.  The download link on that page led here:
http://commons.apache.org/net/download.html

Good luck!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.