Add system jars to classpath.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@620 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-11-18 04:05:42 +00:00
parent 0010525ee7
commit 45251dba8c
+12 -6
View File
@@ -54,16 +54,22 @@ if (defined $libpath) {
}
# put everything in our class path
my $classpath = "-classpath $root/tests/dist/classes:$root/dist/classes:$jlib";
my $classpath = "-classpath $root/tests/dist/classes:$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 server root (this is for server code)
my $rootarg = "-Droot=$root";