Look in JAVA_LIBS for the system-wide java libraries rather than hard
coding the path to /usr/share/java. This allows us to set JAVA_LIBS to the path to yolibs when building and running Narya code. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@858 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
+4
-2
@@ -57,9 +57,11 @@ if (defined $libpath) {
|
||||
# put everything in our class path
|
||||
my $classpath = "-classpath $root/tests/dist/classes:$root/dist/classes";
|
||||
|
||||
# add zip and jar files from our lib/ directory and the system lib/ directory
|
||||
my @dirs = ( "$root/lib", "/usr/share/java" );
|
||||
# add zip and jar files from our lib/ directory and the global Java
|
||||
# libraries directory
|
||||
my @dirs = ( "$root/lib", $ENV{"JAVA_LIBS"} );
|
||||
foreach $dir (@dirs) {
|
||||
next unless (defined $dir);
|
||||
if (opendir(DIR, $dir)) {
|
||||
foreach $lib (grep { /.(zip|jar)/ && -f "$dir/$_" } readdir(DIR)) {
|
||||
$classpath .= ":$dir/$lib";
|
||||
|
||||
Reference in New Issue
Block a user