From bf466db2e1337c1e095a883bad50e4b21859ff4b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 20 Jul 2001 17:33:09 +0000 Subject: [PATCH] Some modifications to make runjava behave more like we want it to. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@89 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- bin/runjava | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/runjava b/bin/runjava index 291769143..c7180a94a 100755 --- a/bin/runjava +++ b/bin/runjava @@ -2,7 +2,7 @@ use Getopt::Std; -my $usage = "Usage: $0 [-p pid_file] [-r server_root] args\n"; +my $usage = "Usage: $0 [-p pid_file] [-r root_directory] args\n"; # locations of stuff chomp($location = `dirname $0`); @@ -52,7 +52,7 @@ if (defined $libpath) { } # put everything in our class path -my $classpath = "-classpath $jlib:$root/dist/classes"; +my $classpath = "-classpath $jlib:$root/dist/classes:$root/dist/rsrc"; # any zip or jar files in our lib/ directory get added to the class path if (opendir(DIR, "$root/lib")) { @@ -63,10 +63,7 @@ if (opendir(DIR, "$root/lib")) { } # specify our server root (this is for server code) -my $serverroot = "-Dserver.root=$root"; - -# specify our base directory (this is for client code) -my $basedir = "-Dbase.dir=$root/src/java"; +my $rootarg = "-Droot=$root"; my $pid_file = undef; my $i = 0; @@ -89,7 +86,7 @@ for ($i = 0; $i < @ARGV; $i++) { $i -= 1; # decrement i so that things stay in sync } elsif ($arg eq "-r") { - $serverroot = "-Dserver.root=" . $ARGV[$i+1]; + $rootarg = "-Droot=" . $ARGV[$i+1]; splice(@ARGV, $i, 2); $i -= 1; # decrement i so that things stay in sync } @@ -98,6 +95,6 @@ for ($i = 0; $i < @ARGV; $i++) { # log the pid file if requested to do so print `echo $$ > $pid_file` if (defined $pid_file); -my $cmd = "$java -mx256M $classpath $serverroot $basedir " . join(" ", @ARGV); +my $cmd = "$java -mx256M $classpath $rootarg " . join(" ", @ARGV); # print "$cmd\n"; exec($cmd);