Every O/S has a command prompt interface but in order to use it for Java we
need to set two environment variables:
path (to inform
the O/S where the JDK binaries reside) and
(to inform the Java VM where our classes reside). Once these two
are set, you can issue any of the following commands:
\prog the current working directory
java eCheck nnn
nnn, i.e. the app
|Allows you to set your eCheck options, e.g. login data.
We will only discuss setting the environment variables on Windows because
doing so in any other O/S is similar if not easier.
The Start, Accessories sequence allows you
to launch the Command (or MS-DOS) Prompt. The black screen is characterized
> prompt. In order to compile/run Java programs,
we must first issue the following two environment commands:
>set path=\Program Files\java\jdkxxx\bin;%path%
(there should be no spaces before or after the
= sign). These two
commands must be issued every time you launch the command prompt console. If
you find this inconvenient, you can use the procedure described below to change
these two environment variables permanently.
Setting the Java Environment Variables in Windows
You must set the path variable so it points to your JDK before
you can issue Java. This can be achieved in two different ways.
The first is easier but requires that you issue a command every time you
open the command prompt window. The second is a bit more involved but it
sets the path once and for all. Choose one of the two:
- Using the "begin" Command
First, determine where your JDK is located. On most machines, it will
\Program Files\Java\jdkxxx\bin;, where
is the JDK version, e.g.
1.6.0_02. Second, edit the file
begin.bat stored in your Working Directory and change
its second line so that it correctly points to your JDK, e.g.
set path=\"program files"\java\jdk1.6.0_02\bin;%path%
Save the modified file. Now every time you open the command prompt
you will need to issue the command begin, and this will correctly
set your environment.
- Using your O/S
In order to avoid having to manually set the environment variables
classpath every time the console
is opened, you can set them once and for all within Windows as follows:
Note: you can configure the command prompt console in Windows-XP
by clicking the icon in its upper left corner. For example, you
can increase its scrolling buffer, modify its font, or enable
mouse-ENTER copy and paste.