Equinox Launcher and LD_LIBRARY_PATH [message #1060069] |
Wed, 22 May 2013 16:42  |
Eclipse User |
|
|
|
I am looking for a way to configure the Equinox Launcher in a way that it starts Eclipse with modified value of the $LD_LIBRARY_PATH environment variable.
Is this possible?
The background is that we have Eclipse-based product that is heavily hit by issues with the WebKit on 64-bit Linux, e.g. [1], [2] and [3]. Latest Ubuntu distros have WebKitGTK 1.10.2 installed, which is not well supported by SWT and causes Eclipse to crash. A possible workaround is to downgrade the installed WebKitGTK to 1.8.3.
I am exploring the opportunity to bundle a validated version of WebKitGTK with our Eclipse product, so users are not required to apply any non-intuitive workarounds. According to the SWT FAQ [4] the WebKitGTK library must be in the load library path. On Linux it is possible to modify the load library path using the $LD_LIBRARY_PATH environment variable. I was able to successfully test this approach by setting $LD_LIBRARY_PATH before launching Eclipse. Now I am looking for a way how to tell the Equinox Launcher to load Eclipse with modified value of $LD_LIBRARY_PATH.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392967
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=404776
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=400626
[4] http://www.eclipse.org/swt/faq.php#browserwebkitgtk
|
|
|
|
Re: Equinox Launcher and LD_LIBRARY_PATH [message #1060172 is a reply to message #1060152] |
Thu, 23 May 2013 07:51  |
Eclipse User |
|
|
|
Pascal, you rock! (as always)
Your second suggestion leads to a very elegant solution. I can define a BrowserInitializer class (as suggested in the SWT FAQ [1]), that is called before SWT creates the first instance of a browser, and load my own version of WebKitGTK in its static initializer using Runtime.load().
However, I'd like to explore also your first suggestion, which I didn't understand very well. My Eclipse-based product is indeed started using the Eclipse launcher - the executable. What do you mean by "store your library next to it"? I copied my library in the root folder (where the launcher executable is) of my product, but this didn't help loading my library instead of the one installed in the OS.
[1] http://www.eclipse.org/swt/faq.php#browserspecifydefault
|
|
|
Powered by
FUDForum. Page generated in 0.03433 seconds