现象:用eclipse的导出工具,生成一个产品目录,点击里面的执行文件,报错: java
The xx executable launcher was unable to locate its companion shared library国内网上搜了一下,都是eclipse本身启动时报这个错,基本上的解决方案以下:
修改Myeclipse.ini文件
shell
-startup ../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library ../Common/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -install D:/Program Files/Genuitec/MyEclipse-8.6 -vm D:/ProgramFiles/Genuitec/Common/binary/com.sun.java.jdk.win32.x86_1.6.0.013/jre/bin/client/jvm.dll -configuration configuration -vmargs -Xmx512m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m
不能解决独立osgi产品的运行问题,可是eclipse也是osgi框架,对比ini后发现,产品ini里没有“startup”的描述,判断是自动产生的配置里缺乏一起,最后在一个老外的网页上看到一些解释,网址以下: app
http://devblog.virtage.com/2012/09/equinox-launcher-error-the-xy-executable-launcher-was-unable-to-locate-its-companion-shared-library/ 框架
转帖文字以下: eclipse
Sometimes in your Eclipse RCP/Equinox based development you may encounter this error. In this short tip I will explain the reason of this error and it can be fixed. jvm
Replace name of “plexflow-server” with “your-app”. ide
Launcher is platform-specific part of Eclipse Equinox that eases launching OSGi Framework and provides more native feeling from starting Eclipse RCP or OSGi based applications to the end users. 工具
Launching in native way is composed of three parts: native exacutable itself, platform specific library and Java launcher JAR. post
You can read more about Equinox launcher in my previous post. ui
Native launcher cannot locate shared library. It is missing inplugins/folder or is not in folder (exploded) form so native launcher cannot load load it.
Make sure that your build app has this layout:
+ your-app/ +--- your-app.exe +--+ plugins/ +---- prg.eclipse.equinox.launcher_<os>.<ws>.<arch>_<version>/ +--- eclipse_1502.so (Linux) OR +--- eclipse_1503.dll (Win) OR +--- eclipse_1503.so (Mac)==========最终解决方案=======
把eclipse的plugins目录下的
org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835目录
和org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar包
copy到产品plugins目录下,
在产品ini文件中添加-startup这段配置,
再次执行启动脚本,成功经过。