Changeset 32153 for main/trunk/gli
- Timestamp:
- 2018-02-26T19:57:21+13:00 (6 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 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;
Note:
See TracChangeset
for help on using the changeset viewer.