Netbeans is the best - but Japa is simpler for small programs
If you use Japa with a different version of the JDK to the one on
the CDROM (jdk1.5.0_03), then you need to reconfigure japa by running it,
and using Tools|Configure Java. Browse to the bin folder and select the file java.exe in the version of
Java that you have downloaded and installed
The supplied CD-ROM contains the following:
Java 1.5 JDK (Java Development Kit) for Microsoft Windows, plus Sun's NetBeans IDE.
Java 1.5 JDK for Linux systems, plus Sun's NetBeans IDE.
Sun's Java documentation.
The code for the examples from this book.
The Japa program development system for Microsoft Windows (2000 and XP only).
The c.bat and r.bat commands for command-line work. See Appendix I in book.
Notes on the software
Note that some files require a zip program to unpack them. You can download an evaluation copy of Winzip
from here.
If you intend to use Japa or the c and r commands, accept the default file paths
that the JDK suggests.
CD-ROM Structure and Installation
At the top level, there is:
jdk-1_5_0_03-nb-4_1-win.exe. Java for Microsoft Windows, with netbeans. Run this and accept the default folder for
the JDK and NetBeans. (If you choose a different folder
for your install, then Japa - below - will need re-configuring.)
jdk-1_5_0_03-nb-4_1-linux.bin. Java for Linux, with netBeans.
jdk-1_5_0-doc.zip - Sun's Java documentation as a zip file. Though it contains details of every method and
class in the java libraries, you may find it easier to use the appendices in our book. You can
extract the files to any folder. It expands to a huge number of HTML files. Click on index.html to
access the documentation.
japaFiles.exe. The Japa programming environment for Java. This is a simple (but rather primitive)
system for beginners. To install it, run the file, then accept the default folder
(c:\japa) that is suggested. Click 'unzip'. Japa is now installed. Note that the file does not need
a separate unzip program.
Inside the c:\japa folder,
you will see a further folder named japaToDistrib. Open it.
Run Japa by clicking on japa.exe. You may wish to place a shortcut to japa.exe
on your desktop with the right mouse button.
japafiles.zip. This is identical to japafiles.exe, but is packaged as a zip file. Some systems
place restrictions on exe files, so we provide this alternative.
Getting Started with Japa
OK - you have installed Japa and the JDK. Now, create a folder where you will save your programs. (You
might name it JavaPrograms, for example.)
Run Japa as explained above.
To create a program , click File | New Swing Drawing Application. You will be instructed to:
Enter your chosen class name
Select a place to store your program (e.g. the JavaPrograms folder)
Save the changes to your program (choose Yes)
You can now edit the program, and use the Compile and Run buttons. You program is
automatically saved each time you compile.
(Ignore the black 'Dos' windows - they will close by themselves in a few seconds.)
If a compilation error appears, click on the error message line in the bottom
panel - the one which has your file name in it -
to go to the line in question. Fix and compile again.
Note that when you start on Chapter 3 of Java For Students, most of the programs have the same pattern -
a drawing area and a button. Japa can much of create this code for you. Use File | New Swing Drawing Application
For programs with no drawing element (where text fields for entering data are involved),
use the File | New Swing Text Field Application menu.
Explore the Help menu, and note that the Tools menu provides a format code option,
which indents your code properly.
Make frequent use of this!
A note on file locations. If you installed the JDK in a non-recommended
folder, use Tools|Configure Java to
ensure that Japa knows where the JDK is.