Cannot load the DLL file (HRESULT 0x80070002)

Eclipse is looking for a .dll file that my plug-in should execute. This is the full path to 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 as follows:

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

Works!

 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 when I run my plug-in as soon as the file gets access, I get the following:

enter image description here

Using FUSLOGVW.EXE , it says the same thing:

 *** 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 anyone know what could be the problem?

+4
source share
2 answers

I think this error can be caused by the lack of dependency for "jni4net.n-0.8.6.0.dll". On Windows, I would suggest using FileMon / ProcessMonitor to check which files / dlls Eclipse is trying to load immediately before this error.

+2
source

Complete the file name: jni4net.n.w32.v20-0.8.6.0 Instead of what you used: jni4net.n-0.8.6.0.dll

0
source

Source: https://habr.com/ru/post/1498951/


All Articles