【发布时间】:2009-06-22 14:25:15
【问题描述】:
我有一个 RCP 应用程序(称为 RCP-APP)。我创建了一个新插件(称为插件 A),它包装了媒体播放器 api(.jar 文件)和媒体播放器 api 通过 JNA 访问的 C 库(dll)文件夹。然后我创建了另一个插件(称为插件 B),其中包含依赖于插件 A 的媒体播放器应用程序。
当插件 B 被激活时,我收到以下错误消息,通知我插件 B 找不到它正在寻找的媒体播放器 .dll:
!ENTRY org.eclipse.jface 4 2 2009-06-22 10:05:22.475 !MESSAGE 从插件调用代码时出现问题:“org.eclipse.jface”。 !堆栈 0 java.lang.UnsatisfiedLinkError:无法加载库“libvlc”:找不到指定的模块。 在 com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114) 在 com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157) 在 com.sun.jna.Library$Handler.(Library.java:123) 在 com.sun.jna.Native.loadLibrary(Native.java:260) 在 com.sun.jna.Native.loadLibrary(Native.java:246) 在 org.videolan.jvlc.internal.LibVlc.(LibVlc.java:41) 在 org.videolan.jvlc.JVLC.(JVLC.java:45) 在 com.bah.gs.arts.jekyll.plugins.videolog.VideoLogDisplay.displayStream(VideoLogDisplay.java:32) 在 com.bah.gs.arts.jekyll.core.extensionpoints.DisplayStreamFactory.getDisplayStreams(DisplayStreamFactory.java:57) 在 com.bah.gs.arts.jekyll.core.views.medialist.MediaListView$1.doubleClick(MediaListView.java:91) 在 org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:799) 在 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) 在 org.eclipse.core.runtime.Platform.run(Platform.java:880) 在 org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) 在 org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) 在 org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:797) 在 org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419) 在 org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1173) 在 org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:237) 在 org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:234) 在 org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:295) 在 org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) 在 org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) 在 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) 在 org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) 在 org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) 在 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) 在 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) 在 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 在 com.bah.gs.arts.jekyll.core.Application.start(Application.java:20) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1236) 在 org.eclipse.equinox.launcher.Main.main(Main.java:1212)如何通知插件 B(或 RCP-APP).dll 位于插件 A 的特定文件夹中?
似乎 api 希望通过其环境 PATH 变量找到 .dll。
我如何才能从本质上传达“插件 A/文件夹名称”?
感谢您的帮助。
【问题讨论】:
标签: eclipse eclipse-plugin eclipse-rcp eclipse-pde