Can't load .dll file (HRESULT 0x80070002)

1.9k views Asked by At

Eclipse does look for a .dll file that a plug-in of mine needs to execute. This is the full path of the file:

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

Trying to open it like this:

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());
  }

}

Does work!

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

But as I run my plug-in as soon as the file gets accessed I receive the following:

enter image description here

Using FUSLOGVW.EXE it says the same:

*** 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.

Does anybody know what the problem could possibly be?

2

There are 2 answers

1
Arkadiusz Wojcik On BEST ANSWER

I think this error might be because missing dependency for "jni4net.n-0.8.6.0.dll". On Windows I would suggest to use FileMon/ProcessMonitor to check what files/dlls Eclipse tries to load just before that error.

0
Peter Trypsteen On

End the filename with: jni4net.n.w32.v20-0.8.6.0 Instead of what you used: jni4net.n-0.8.6.0.dll