Changeset 30402 for main/trunk/greenstone2/common-src/indexers/mg/java/org/greenstone/mg/MGSearchWrapper.java
- Timestamp:
- 2016-03-14T10:34:17+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/indexers/mg/java/org/greenstone/mg/MGSearchWrapper.java
r20298 r30402 38 38 39 39 static { 40 System.loadLibrary("mgsearchjni"); 40 41 String gsdlos = System.getenv("GSDLOS"); 42 if (gsdlos!=null && gsdlos.equals("darwin")) { 43 // As of MacOX 10.11 (El Capitan), effectivly supresses DYLD_LIBRARY_PATH (does 44 // not propagate it to child processes). This is a result of changes to their 45 // security model, and seems to come into effect for 'untrusted' executables. 46 // Greenstone run as a regular user, is 'unstrusted'. It is possible, with 47 // admin rights, to override this, however that is not really a viable solution 48 // for our project. Hence the change here to use Systen.load() with an 49 // absolute pathname, rather than rely of System.loadLibrary(). 50 51 String gsdl3srchome = System.getenv("GSDL3SRCHOME"); 52 String full_jni_library = gsdl3srchome + "/lib/jni/libmgsearchjni.jnilib"; 53 System.load(full_jni_library); 54 } 55 else { 56 System.loadLibrary("lib/jni/libmgsearchjni.jnilib"); 57 } 58 41 59 initIDs(); 42 60 }
Note:
See TracChangeset
for help on using the changeset viewer.