![]() |
The NetRexx Pinger application |
This is an example of a stand-alone Java application, which has been
written in NetRexx; when running, it should
look something like this:
![]() |
Pinger is a 'kitchen timer' application. Use the
unmarked spin buttons to set the minutes and seconds, then press Start
to start the timer.
The program shows the use of Frames, simple menus and Dialogs, multiple threads (for the spin buttons and the main timer function), a custom component, off-screen Image drawing (graphics), Java 1.1 mouse and event handling, and playing an audio clip from a file. |
Notes:
Here's the NetRexx source, as a plain ASCII file. Here, too is the pinger sound clip.
You can also download the Pinger package (with the .class files already compiled from the source) in zip format [nrping.zip, 23kB] or in tar+compress format [nrping.tar.Z, 30kB]. The Pinger package is also included in the NetRexx package -- you may prefer to download the whole package, including the other NetRexx samples and examples.
Please note that the Pinger package is part of the NetRexx package, and is covered by the terms in the IBM License Agreement for that package.
Note that the Java runtime (e.g., from the Java Development Kit) must be installed before you can run stand-alone Java applications. See downloading the NetRexx package for more details.
If you downloaded one of the packages above (.zip or .tar.Z), first unpack the files into a directory (see installation for details of the commands to use for unpacking). Then, in that directory, run:
java Pinger
Note that you need the capital letter 'P' as shown, as the java command is case-sensitive.
To compile and run the program, create or copy the 'Pinger.nrx' file (note the first letter is a capital letter), and then enter the commands:
java COM.ibm.netrexx.process.NetRexxC Pinger java Pinger
This would:
[ NetRexx | IBM home page | Search | Contact IBM | Help | Legal | Privacy ]
This page was created on 27 Nov 1997; it can be found from http://www2.hursley.ibm.com/netrexx/