Next: Compiling and Running an
Up: Installing hpjdk
Previous: For Windows command prompt.
Contents
Index
This is similar to Linux or UNIX. The main difference
is that typically one is using Java development software installed
for Windows itself (not Cygwin). This means that the CLASSPATH
value--which is interpretted by the Java platform--should identify
directories and files through Windows-style paths, instead the equivalent
UNIX-style path.
Before trying to install hpjdk, ensure your environment is set up
so that the javac and java commands are working correctly
from the Cygwin prompt.
Download hpjdk-1.0.tar.gz. In a suitable parent directory,
execute a command such as
to unpack the archive. For illustration, we assume you run this
command in the directory /home/myid/. On success, it
creates a directory /home/myid/hpjdk/.
Now you must set three environment variables correctly. First you need to
create an environment variable HPJAVA_HOME, pointing to the directory
under which hpjdk is installed. Then you need to add the directories
hpjdk/classes/ and hpjdk/classes/multithreaded/ to
your CLASSPATH environment variable. Finally, you should add
the directory hpjdk/bin/ to your PATH environment variable.
For reasons discussed above, paths in HPJAVA_HOME and CLASSPATH
must be translated to the equivalent Windows-style paths.
For illustration we assume that Cygwin in installed in the folder
c:\cygwin\. Then you can set the required variables by adding
the following lines to the file .bashrc in your home directory:
As advertised, the paths in HPJAVA_HOME and CLASSPATH
are basically in Windows format. We took advantage of the leniency of
typical Java systems, which tolerate either forward slash or backslash
(using backslash would be more tedious, because backslash is
the escape character of the UNIX shell). The value of CLASSPATH
is quoted, to make sure that the Windows-style semicolon path separator is
not interpretted as the shell command terminator. Notice that
the PATH environment variable is not subject to these
complications, because it is processed by the Cygwin shell itself,
not by any Windows-based software. But for this reason we can't reuse
the HPJAVA_HOME value in setting PATH here--it is in the
wrong style.
After making these edits to .bashrc, start a new Cygwin shell.
Next: Compiling and Running an
Up: Installing hpjdk
Previous: For Windows command prompt.
Contents
Index
Bryan Carpenter
2003-04-15