Ignore:
Timestamp:
2019-02-21T16:43:10+13:00 (5 years ago)
Author:
ak19
Message:

Undoing recent commit of forcing the ant force-start-derby target of using the bundled JRE's java. This would only have been correct during the installer. During the installer, launching java directly fails on systems that don't have java installed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/build.xml

    r32789 r32792  
    99<project name="greenstone3" default="usage" basedir=".">
    1010  <echo>os.name: ${os.name}</echo>
    11 
     11 
    1212  <!-- ============ classpath =================== -->
    1313  <path id="project.classpath">
     
    9696  <condition property="current.os.iswindows">
    9797    <os family="windows"/>
    98   </condition>
    99 
    100   <!-- Java executable: if packages/jre/bin exists as it does for GS3 binaries, use that.
    101        JRE not included in svn/devel GS3, for which we attempt to use any installed java
    102        as before. -->
    103   <condition property="javaexec" value="packages/jre/bin/java" else="java">
    104     <available file="packages/jre/bin/java"/>
    10598  </condition>
    10699
     
    11131106  <target name="force-start-derby">
    11141107      <property name="derby.server.classpath.prop" refid="derby.server.classpath" />
    1115      
    1116       <exec executable="${javaexec}" spawn="true"><!-- failonerror="true"-->
     1108      <!-- During the installer, launching java directly fails on systems that don't have java installed.
     1109       Forcing force-start-derby to always use packages/jre/bin/java is wrong too: as gs3-setup does
     1110       a lot of work of determining the correct JRE_HOME/JAVA_HOME (not necessarily the GS3 bundled JRE)
     1111       and we want to be consistent in using the same java throughout. Solution:
     1112       Refer to the JRE used in executing this ant file, which for installers will always be the bundled one.
     1113       https://stackoverflow.com/questions/17571595/env-java-home-not-found-ant -->
     1114      <exec executable="${java.home}/bin/java" spawn="true"><!-- failonerror="true"-->
    11171115    <env key="CLASSPATH" path="${derby.server.classpath.prop}"/>
    11181116    <arg value="org.apache.derby.drda.NetworkServerControl"/>
Note: See TracChangeset for help on using the changeset viewer.