Here's a summary of what you need to do to install JR
and translate and execute JR programs
on a Windows system.
These steps are similar to those for UNIX systems
and you can consult
Instructions
for Downloading and Installing JR
and Instructions for JR
program translation and execution
for more details.
-
tested on Windows XP systems and Windows NT systems; not likely
to work on Windows 9x systems.
Also tested on Windows 7 systems,
where we've been only partially successful in getting multi-VM JR programs to work
(See details under rsh.)
- You need JR, Java (JDK), and Perl.
(However, if you want to run multi-VM JR programs, you also
need an rsh. You can skip that for now.)
- set
or modify the environment variables that are needed by JR:
- set JR_HOME to the location of the directory in which you
installed JR. E.g., on my Windows system I use
c:\Program Files\jr
- set Path to incorporate JR_HOME's value. In general, set it to
JR_HOME\bin;...
(the ... represents what Path was previously set to)
but replace JR_HOME with its value. E.g., on my Windows system I
use
c:\Program Files\jr\bin;...
- set CLASSPATH to incorporate JR_HOME's value. In general,
set it to
.;JR_HOME\classes\jrt.jar;JR_HOME\classes\jrx.jar
but replace JR_HOME with its value, e.g., on my Windows system I
use
.;c:\Program Files\jr\classes\jrt.jar;c:\Program Files\jr\classes\jrx.jar
Be sure to include the initial ".".
- set JRSH to cmd
- set JRSHC to /C
- the DISPLAY environment variable (needed for JR in UNIX)
does not need to be set for
Windows.
-
These changes probably will not take effect in your current cmd
windows; you might need to start a new cmd window
or even logout and re-login to get the new values.
- to test that JR is working, use jrv:
- in the JR_HOME directory,
cd vsuite
..\jrv\jrv quick
The above will run a few tests and, if all's well, just echo their names as
it runs them. You can run many tests by
..\jrv\jrv
That might take over an hour depending on your system. It also
requires rsh.
- here's how to set or
modify environment variables:
- Right click on the My Computer icon that should be on the
desktop or in the Start Menu.
- Select Properties from the menu.
- Select the Advanced tab.
- Click the Environment variables button.
- Make the change in either
- System Variables: this requires that you have administrator
rights; the change will apply to all users. Note that multi-VM JR
programs require the use of rsh. The rsh
mentioned
below (perhaps others too) requires these JR environment variables
to be System Variables; we've observed that the system must be rebooted
before the changes take effect from rsh's perspective.
- User Variables: otherwise (but multi-VM JR programs won't
work).
- rsh
- In our tests, we used
http://www.denicomp.com/rshdnt.htm. Other RSH products might
work (please let us know). Note this product has a 30-day
evaluation period. The only RSH option we used with this product was
"Attempt Redirection on Every Command".
- Security configuration and warning!
- We just started the RSH daemon before testing and killed it
after testing on an isolated network.
- We've also run the RSH daemon using User Equivalencies on a
non-isolated network. In this mode, we found we needed to use IP
numbers instead of hostnames, so we had equivalencies for, e.g.,
- joe@169.237.5.43
- joe@127.0.0.1 (need this one
for localhost)
- With this rsh, we observed that some programs that use Swing
don't pop up all their windows. E.g., vsuite/dp/dpVis doesn't pop
up
all client windows; codeextract2.0/gui/BnB doesn't pop up its main
window. Configuring
rsh's (under "RSH Options") "Default Window Type ..." to be
"Normal"
seems to fix the problem. (However,
the extra cmd windows are
somewhat annoying.) This problem was
discovered in testing for
2.00003, but previous 2.x versions exhibit this same
behavior on our
Windows test machines.
-
On Windows 7, we were only partially successful
in getting multi-VM JR programs to work.
(These problems also occur with the previous version of JR.)
Our test platforms were 64-bit systems.
The above rsh server seems to work fine with the rsh client from the
same site.
(Windows 7, unlike Windows XP, does not come with an rsh client.)
However,
we get some kind of permissions problem when we try to run
multi-VM JR programs using this setup.
We were successful using the same rsh server
with the rsh client that comes with
Cygwin.
Here are examples of the settings of the two critical environment variables:
-
JRRSH=C:\cygwin\bin\rsh
-
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Java\jdk1.6.0_21\bin;C:\cygwin\bin;C:\Perl64\bin;C:\Program Files\jr\bin
This configuration has worked for us with the full Cygwin installation
(which is large)
and
with
a stripped down Cygwin installation
.
We followed
Cygwin installation instructions
.
We also tried various ssh servers and clients,
but were again unsuccessful.
If you are successful
in getting multi-VM JR programs to work
on Windows 7 with a different rsh or ssh combination,
please let us
(jr-project@cs.ucdavis.edu)
know
so we can update this webpage.
- known Windows-specific problems:
- 2004-11-30 (although observed earlier).
vsuite/misc/receive_a_proc_op/3 seems to not work correctly sometimes.
- 2003-09-26. An annoying, but not signficant, problem in
running the vsuite. This problem seems to happen repeatedly on
individual systems, but only for some systems. We haven't been
able to find the distinguishing characteristic.
./environment/classpath/testcodezend
Can't unlink file mypkg.jr: Permission denied at C:......\jrv\jrv line
414
Historical notes:
- Windows and Perl scripts.
- Our original Windows implementation (Summer 2003) used only the
Perl scripts; it did not use .bat files. To allow the user to
type just "X" instead of "perl .....X", we included the .pl suffix in
the PATHEXT environment variable (which specifies the executable
extensions).
- Our newer Windows implementation (Fall 2003) included both and
the .bat files (which just invoke the Perl scripts) worked fine.
- However, we had noticed a problem
- 2003-09-26: Problems with redirecting the output of jr, jrgo,
and jrgox. The file to which output is redirected is empty.
The programs run fine without redirection. These problems
seem to happen repeatedly on individual systems, but only for some
systems. We haven't been able to find the distinguishing
characteristic. In running the vsuite, these tests will fail as
shown due to this problem
./tools/jr/babybad:
expected
0, got 1 from cmp
./tools/jr_findmain_go/1:
expected
0,
got 1 from cmp
- 2003-12-05: We discovered a problem on redirecting input.
Got "handle invalid" from Java, but only when we had .pl before
.bat in PATHEXT. We don't know the exact cause, but we reduced it
to a simpler problem: a 1 line Perl that contains just system("sort");.
When invoked as X < file, it gives "The handle is invalid."
too. It works fine, though, when invoked as perl X < file.
- 2003-12-05: We also discovered that not including .pl in
PATHEXT eliminates the output redirection problem noted earlier too.
- So, since we no longer need the .pl files and apparently
there's a bug in using them, we eliminated them.