177 |
177 |
|
178 |
178 |
if (!path.contains(libpath)) {
|
179 |
179 |
path += libpath;
|
|
180 |
//path = cqplibpath + System.getProperty("path.separator"); // test to load dependent dlls
|
180 |
181 |
}
|
181 |
182 |
System.setProperty("java.library.path", path);
|
182 |
183 |
//System.out.println("Current java.library.path "+System.getProperty("java.library.path"));
|
... | ... | |
186 |
187 |
fieldSysPath.setAccessible( true );
|
187 |
188 |
fieldSysPath.set( null, null );
|
188 |
189 |
|
|
190 |
|
|
191 |
// FIXME: tests to load dependency dlls from plugin directory
|
|
192 |
// it works but its platform dependent
|
|
193 |
// System.loadLibrary("libglib-2.0-0");
|
|
194 |
// //System.loadLibrary("IEShims");
|
|
195 |
// System.loadLibrary("libcharset-1");
|
|
196 |
// //System.loadLibrary("libgnurx-0");
|
|
197 |
// System.loadLibrary("libiconv-2");
|
|
198 |
// System.loadLibrary("libintl-8");
|
|
199 |
// System.loadLibrary("libpcre-1");
|
|
200 |
// System.loadLibrary("pcre3");
|
|
201 |
|
|
202 |
|
189 |
203 |
System.loadLibrary("cqpjni");
|
190 |
|
Log.info("cqpjni loaded from dirs "+path);
|
|
204 |
Log.info("cqpjni loaded from dirs: " + path + ".");
|
191 |
205 |
isLoaded = true;
|
192 |
206 |
|
193 |
207 |
} catch (Throwable e) {
|
194 |
208 |
System.err.println("MemCqiServer: Failed to load CQP lib with exception: "+e);
|
195 |
|
System.err.println("Looking for Cqi libs in : "+System.getProperty("java.library.path"));
|
|
209 |
System.err.println("Tried to load Cqi libs in: "+System.getProperty("java.library.path") + ".");
|
196 |
210 |
System.err.println("Current directory: "+new File(".").getAbsolutePath());
|
197 |
211 |
throw new Exception(e);
|
198 |
212 |
}
|
... | ... | |
200 |
214 |
|
201 |
215 |
String[] cmd = { "", "-I", pathToInitFile, "-r", pathToRegistry }; //$NON-NLS-1$ //$NON-NLS-2$
|
202 |
216 |
cmdLine = (String[]) ArrayUtils.addAll(cmd, additionalOptions.trim().split(" ")); //$NON-NLS-1$
|
203 |
|
Log.info("Starting NullSearchEngineServer: "+Arrays.toString(cmdLine)+" ... ");
|
|
217 |
Log.info("Starting NullSearchEngineServer: " + Arrays.toString(cmdLine) + " ... ");
|
204 |
218 |
|
205 |
219 |
//try {
|
206 |
220 |
isLoaded = start(cmdLine);
|