From 862595e9c94a865852387521dd84a92e3f1bb225 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 4 Dec 2001 01:12:35 +0000 Subject: [PATCH] Add the system classes (/usr/share/java) to the classpath as well. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@733 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- bin/runjava | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/runjava b/bin/runjava index fbed85a58..8697f4fb0 100755 --- a/bin/runjava +++ b/bin/runjava @@ -52,16 +52,22 @@ if (defined $libpath) { } # put everything in our class path -my $classpath = "-classpath $jlib:$root/dist/classes"; +my $classpath = "-classpath $root/dist/classes"; -# any zip or jar files in our lib/ directory get added to the class path -if (opendir(DIR, "$root/lib")) { - foreach $lib (grep { /.(zip|jar)/ && -f "$root/lib/$_" } readdir(DIR)) { - $classpath .= ":$root/lib/$lib"; +# add zip and jar files from our lib/ directory and the system lib/ directory +my @dirs = ( "$root/lib", "/usr/share/java" ); +foreach $dir (@dirs) { + if (opendir(DIR, $dir)) { + foreach $lib (grep { /.(zip|jar)/ && -f "$dir/$_" } readdir(DIR)) { + $classpath .= ":$dir/$lib"; + } + closedir DIR; } - closedir DIR; } +# finally add the standard classes +$classpath = "$classpath:$jlib"; + # specify our application root (the resource manager needs this) my $rootarg = "-Dapplication.root=$root";