4

Eclipse 确实会查找我的插件需要执行的 .dll 文件。这是文件的完整路径:

C:\Eclipse\eclipse-sib\eclipse\configuration\org.eclipse.osgi\bundles\324\1\.cp\jni4net.n.w32.v20-0.8.6.0

尝试像这样打开它:

public class Main {

  public static void main(String[] args) {

    File f = new File("C:\\Eclipse\\eclipse-sib\\eclipse\\configuration\\org.eclipse.osgi\\bundles\\324\\1\\.cp\\jni4net.n-0.8.6.0.dll");

    System.out.println(f.getName() + " " + f.getAbsolutePath());
  }

}

行得通!

Output:
jni4net.n-0.8.6.0.dll C:\Eclipse\eclipse-sib\eclipse\configuration\org.eclipse.osgi\bundles\324\1\.cp\jni4net.n-0.8.6.0.dll

但是,当我在文件被访问后立即运行我的插件时,我会收到以下信息:

在此处输入图像描述

使用FUSLOGVW.EXE它也是一样的:

*** Assembly Binder Log Entry  (26.08.2013 @ 13:53:35) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable  C:\Eclipse\eclipse-sib\eclipse\eclipsec.exe
--- A detailed error log follows. 

LOG: IJW explicit bind. File path:C:\Eclipse\eclipse-sib\eclipse\configuration\org.eclipse.osgi\bundles\324\1\.cp\jni4net.n-0.8.6.0.dll.

有谁知道问题可能是什么?

4

2 回答 2

2

我认为这个错误可能是因为缺少对“jni4net.n-0.8.6.0.dll”的依赖。在 Windows 上,我建议使用 FileMon/ProcessMonitor 来检查 Eclipse 在该错误之前尝试加载哪些文件/dll。

于 2013-09-02T14:51:01.693 回答
0

以:jni4net.n.w32.v20-0.8.6.0 结束文件名,而不是您使用的:jni4net.n-0.8.6.0.dll

于 2013-09-02T16:57:24.260 回答