Changeset 32153
- Timestamp:
- 2018-02-26T19:57:21+13:00 (5 years ago)
- Location:
- main/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r17629 r32153 152 152 } 153 153 154 // For WebGatherer.java, which uses Java Web Start over JNLP to run the repurposed "applet" as application, 155 // it turned out that for GS3, we need the collectionDirectoryPath set for the subsequent code to work. 156 // In WebGatherer.java, moved the instantiation of the Gatherer object here, but to avoid major changes to 157 // this GathererApplet.java class, just calling the relevant line in Gatherer() constructor at this stage: 158 Gatherer.setCollectDirectoryPath(Gatherer.getGLIUserDirectoryPath() + "collect" + File.separator); 159 154 160 File collect_directory = new File(Gatherer.getCollectDirectoryPath()); 155 161 if (!collect_directory.exists()) { -
main/trunk/gli/src/org/greenstone/gatherer/WebGatherer.java
r32150 r32153 194 194 } 195 195 196 // Create an instance of the Gatherer class, which will parse the args and prepare the rest of the GLI 197 gatherer = new Gatherer(args); // Do this early as it will also call Gatherer.setCollectDirectoryPath(), because we need that to have been set hereafter. 198 196 199 File collect_directory = new File(Gatherer.getCollectDirectoryPath()); 197 200 if (!collect_directory.exists()) { … … 217 220 unzipFromJar("metadata.zip", Gatherer.getGLIDirectoryPath()); 218 221 } 219 220 // Create an instance of the Gatherer class, which will parse the args and prepare the rest of the GLI221 gatherer = new Gatherer(args);222 222 223 223 gatherer.openGUI(); -
main/trunk/gli/src/org/greenstone/gatherer/util/JarTools.java
r32139 r32153 133 133 static public boolean isInJar(String filename) 134 134 { 135 InputStream fis = null; 135 136 try { 136 InputStream fis = root_class.getResourceAsStream("/" + filename); 137 fis.close(); 137 fis = root_class.getResourceAsStream("/" + filename); 138 if(fis == null) { 139 System.err.println("@@@ JarTools.isInJar(): file inputstream for file /"+filename+" is still null. Not in jar file."); 140 return false; 141 } 138 142 } 139 143 catch (Exception exception) { … … 141 145 return false; 142 146 } 147 finally { 148 if(!SafeProcess.closeResource(fis)) { 149 System.err.println("@@@ JarTools.isInJar(): Couldn't close file inputstream"); 150 return false; 151 } 152 } 143 153 144 154 return true; -
main/trunk/greenstone3/build.xml
r32152 r32153 649 649 </path> 650 650 651 652 <path id="local.tomcat.path"> 653 <pathelement location="${basedir}/bin/script"/> 654 <pathelement location="${basedir}/bin"/> 655 <pathelement location="${lib.jni}"/> 656 <pathelement path="${env.PATH}"/> 657 <pathelement path="${env.Path}"/> 658 <pathelement path="${wn.home}/bin"/> 659 </path> 651 652 <if><bool><isset property="env.PATH"/></bool> 653 <path id="local.tomcat.path"> 654 <pathelement location="${basedir}/bin/script"/> 655 <pathelement location="${basedir}/bin"/> 656 <pathelement location="${lib.jni}"/> 657 <pathelement path="${env.PATH}"/> 658 <pathelement path="${wn.home}/bin"/> 659 </path> 660 <!-- Windows can be case sensitive about env.PATH, preferring env.Path. See https://ant.apache.org/manual/Tasks/property.html --> 661 <else><if><bool><isset property="env.Path"/></bool> 662 <path id="local.tomcat.path"> 663 <pathelement location="${basedir}/bin/script"/> 664 <pathelement location="${basedir}/bin"/> 665 <pathelement location="${lib.jni}"/> 666 <pathelement path="${env.Path}"/> 667 <pathelement path="${wn.home}/bin"/> 668 </path> 669 <!-- else print error about no path set --> 670 <else> 671 <echo>No env.PATH (or env.Path) set. Unable to set local.tomcat.path property</echo> 672 </else></if></else> 673 </if> 660 674 661 675 <target name="test-setup"> … … 666 680 <echo>is windows : ${current.os.iswindows}</echo> 667 681 <echo>os.unix: ${os.unix}</echo> 682 <echo>env.PATH: ${env.PATH}</echo> 683 <echo>env.Path: ${env.Path}</echo> 668 684 </target> 669 685
Note:
See TracChangeset
for help on using the changeset viewer.