From 3e9e45725b1e996a8aba975f8d3947e106cf5ddd Mon Sep 17 00:00:00 2001 From: mdb Date: Mon, 13 Aug 2001 23:30:52 +0000 Subject: [PATCH] Wasn't included the classpath from the environment. git-svn-id: https://samskivert.googlecode.com/svn/trunk@254 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- projects/viztool/bin/runjava | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/viztool/bin/runjava b/projects/viztool/bin/runjava index 732d03f6..0041c250 100755 --- a/projects/viztool/bin/runjava +++ b/projects/viztool/bin/runjava @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: runjava,v 1.2 2001/07/24 18:06:02 mdb Exp $ +# $Id: runjava,v 1.3 2001/08/13 23:30:52 mdb Exp $ # # A script for invoking java. The project root is inferred to be one # directory above the directory in which this script lives. Based on the @@ -82,7 +82,11 @@ if (defined $libpath) { } # put everything in our class path -my $classpath = "-classpath $jlib:$root/$classdir"; +my $classpath = "$jlib:$root/$classdir"; + +# if there's an environment variable set, we'll need to include that too +my $ecpath = $ENV{"CLASSPATH"}; +$classpath = "$ecpath:$classpath" if (defined $ecpath); # any zip or jar files in our lib/ directory get added to the class path if (opendir(DIR, "$root/lib")) { @@ -96,6 +100,6 @@ if (opendir(DIR, "$root/lib")) { # log the pid file if requested to do so print `echo $$ > $pid_file` if (defined $pid_file); -my $cmd = "$java -mx256M $classpath " . join(" ", @ARGV); +my $cmd = "$java -mx256M -classpath $classpath " . join(" ", @ARGV); print "$cmd\n" if ($verbose); exec($cmd);