At the forefront of Artificial Intelligence
  Home Articles Reviews Interviews JDK Glossary Features Discussion Search
Home » Articles » Programming » Java

Generation5 JDK: The Basics

This article is intended for beginners who are unfamiliar with setting up Java environments. As an example, let's look at how to run the Generation5 JDK demonstrations. Firstly, all the demonstrations require the individual Generation5 JDK CLASS files or JAR archive. The CLASS files can be downloaded by going to the Generation5 JDK SourceForge page and downloading the latest source zip file. The latest JAR file is always found at Note that this tutorial focuses on the Windows command-line, although the principles within Linux remain the same.


Setting up the Classpath

Whether you have downloaded the source or the JAR file, it must be placed in your classpath. The classpath tells Java where to look for library files. Let's say you have downloaded the Generation5 JDK source, and have unzipped it to a directory called "G5JDK". To add the source to your classpath, type the following at the command prompt:

set classpath=%classpath%;c:\g5jdk
  - or -
set classpath=%classpath%;c:\g5jdk\generation5.jar

This appends the Generation5 JDK CLASS files or JAR to the current classpath (%classpath%). More permanent methods of setting the classpath are available but vary greatly according the OS you are using (even between Windows versions).

Running the Demonstrations

Demonstration programs are run using java, whereas applets are run using appletviewer. For example:

java -cp %classpath% CellDiagram
  - or - 
appletviewer -J-classpath -J%classpath% KohonenApplet.html

The first line will run the CellDiagram example, whereas the second line runs the Kohonen Applet. If you have problems getting these to run, check that a) java and appletviewer are in your PATH (appletviewer is often not included in the path by default) and b) classpath points to the Generation5 JDK CLASS files or JAR archive.

A few of the Generation5 JDK classes themselves have a main method that can be called, whether it is simply a test or has some form of functionality. To run these, you will have to call java something similar to:

java -cp %classpath% org.generation5.demos.Wolfram1DCA 3 126 480

Alternative Setups

To end this article, it is worth pointing out there are a few excellent open-source Java IDE programs to help develop your applications or applets with the JDK. Currently, I use NetBeans 3.6 which provides an excellent development environment with integrated form designers, Javadoc, debuggers, code folding and a lot more.

NetBeans example


Remember that because Java is designed to work across many operating systems, different hardware and as standalone application or as an applet. As such, it can be very hard to setup especially from the commandline. If you have any problems, feel free to contact me or post to the Generation5 forums.

Submitted: 08/12/2004

Article content copyright © James Matthews, 2004.
 Article Toolbar
BibTeX entry


Latest News
- The Latest (03/04/2012)
- Generation5 10-year Anniversary (03/09/2008)
- New Generation5 Design! (09/04/2007)
- Happy New Year 2007 (02/01/2007)
- Where has Generation5 Gone?! (04/11/2005)

What's New?
- Back-propagation using the Generation5 JDK (07/04/2008)
- Hough Transforms (02/01/2008)
- Kohonen-based Image Analysis using the Generation5 JDK (11/12/2007)
- Modelling Bacterium using the JDK (19/03/2007)
- Modelling Bacterium using the JDK (19/03/2007)

All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -