Copyright 1998, Evan Chu, all rights reserved.

News Reader Demonstration
 
 

Introduction

This program is a demonstration of an Internet news reader. In another word, it is a Network News Transport Protocol client. It has minimal functionality. Its primary purpose is to demonstrate Java network programming, Java Foundation Class (Swing), and Java multithreaded programming.

The program, 100% pure Java, is written using Sun Microsystems Java Development Kit 1.1.6 and Java Foundation Class 1.1 (Swing 1.0.2). It was developed on a Microsoft Windows 95 platform, but the code should run anywhere.
 
 

Installation

* Download newsreader.jar.

* Extract the content of newsreader.jar into the current classpath.

* All the files are located in ./com/evanchu/ directory.
 
 

Setup

* Execute java com.evanchu.news.Run.

* When the main window is displayed, close it.

* Edit mynewsrc in the current directory. Mynewsrc is the configuration file for the news reader. It contains key-value pairs.

* In mynewsrc, adjust hostname key, which is the host name of the NNTP server.

* In mynewsrc, adjust debug key, which can have the values 1 or 0. If the value is 1, news reader prints diagnostic output to the console window. If the value is 0, news reader does not print diagnostic output.

* Save mynewsrc.
 
 

Description

Execute news reader by using java com.evanchu.news.Run. Press the start-button in the main window. News reader attempts to connect to the NNTP server specified in the configuration file. It then downloads all the names of the news groups that are available on the server.

Using the subscription window, the user can choose a news group. The user can search for a particular news group by entering a partial name in the text field and press the find-group button. If the text field is blank and the find-group button is pressed, all the news groups are listed.

Select a news group from the scrollable list. Press the read-group button to see an index of all the articles in the group. Each line in the table is a single article. If a line contains brackets with numbers in them, it indicates this article has responses. The number is the total number of related articles.

By selecting a single article and pressing the read-article button, the content of the article is displayed. By selecting an article that has responses, the table switches to threading mode that only displays an index of the related articles. The user can press the reverse-thread button to switch back to the main index.
 
 

Technical Support

Contact Evan Chu for technical support, comments, recommendations, wishful features. His email is evanc@his.com. His www site is at http://www.evanchu.com.
 
home email