Changeset 25512


Ignore:
Timestamp:
2012-05-01T15:50:00+12:00 (12 years ago)
Author:
ak19
Message:

Utility function for getting path to the java command: if GS binary, will get the path to java executable in the included JRE, else just the java command on its own which will resort to using the system java.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r25093 r25512  
    17151715}
    17161716
     1717sub get_java_command {
     1718    my $java = "java";
     1719    if(defined $ENV{'GSDLHOME'}) { # should be, as this script would be launched from the cmd line
     1720                               # after running setup.bat or from GLI which also runs setup.bat
     1721    my $java_bin = &util::filename_cat($ENV{'GSDLHOME'},"packages","jre","bin");
     1722    if(-d $java_bin) {
     1723        $java = &util::filename_cat($java_bin,"java");
     1724    }
     1725    }
     1726    return $java;
     1727}
     1728
    17171729
    171817301;
Note: See TracChangeset for help on using the changeset viewer.