To install Relaxer, you must of course first download it. Follow these steps to do so:
C:\Relaxer
setup.zip
This archive contains all the files you need to install the latest version of Relaxer (beta version 1.0RC at the time of this writing). Click on setup.zip
.
setup.zip
in your working directory.After you have successfully downloaded Relaxer, install it by issuing the following
command, assuming that your working directory is C:\Relaxer
and
that you are working on a Windows platform:
C:\Relaxer>java -jar setup.zip
After giving this command, the setup
program asks you some configuration
questions. First it asks where you would like to install Relaxer library (JAR) files:
Install directory [default: C:\usr\local\lib\relaxer]:
You can press Enter
to accept the default, or you might prefer to just
use your working directory, as shown:
Install directory [default: C:\usr\local\lib\relaxer]: c:\relaxer
Next, setup
asks where you want to install the executable or binary
files:
Install directory [default: C:\usr\local\bin]:
Again, you can accept the default or use the working directory:
Install directory [default: C:\usr\local\bin]: c:\relaxer
Once you have set the directory names, setup
asks you to confirm
that you want to install Relaxer:
[Configuration] Install directory = C:\relaxer Command directory = C:\relaxer Type "yes" to install, "no" to re-enter, "exit" to exit >
If you enter no
, you have a chance to change the directory names before
proceeding with the installation. If you enter exit
, setup
aborts
the installation. If you enter yes
, setup
extracts all the
necessary files from archive.jar
in setup.zip
into the directories
you have specified. This process takes a minute or so.
Extract archives... Generate script... script = c:\relaxer\relaxer.bat script = c:\relaxer\relaxer Done.
The batch file relaxer.bat
(or the relaxer
shell script
on Unix) provides an easy way to run Relaxer from the command line. The batch file
has only two lines:
@echo off java -jar C:\relaxer\Relaxer.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
As you can see, the batch program uses an absolute path to
Relaxer.jar
and provides nine replaceable parameters for
command-line arguments. If you are running Windows 2000 or XP, you can replace
%1
through %9
with %*
, if you
wish (%*
replaces any number of parameters, just as
$*
does in a Unix shell script):
@echo off java -jar C:\relaxer\Relaxer.jar %*
In addition, you can place your working directory in the path environment variable so that you can execute the batch file from anywhere on your system. On Windows, you could issue the following command:
C:\Relaxer> path %path%;c:\relaxer
This command appends C:\Relaxer
to the current path
variable. You could also do this by adding a path
command to your autoexec.bat
file, or you can add it by
setting Environment Variables on the Advanced tab under
System on the Control Panel.
By the way, Relaxer finds classpaths quietly, relative to its path, without requiring you to specify them explicitly—except under rare circumstances, such as with the JDBC example at the end of this tutorial.
Now that you have things set up, you are ready to start putting Relaxer to work.