简体   繁体   English

UnsatisfiedLinkError:找不到本地库“ wcepeer”(Mysaifu)

[英]UnsatisfiedLinkError : Native library 'wcepeer' not found (Mysaifu)

I'm trying to code an application in Java that can be executed in a Windows CE operating system. 我正在尝试用Java编写可以在Windows CE操作系统中执行的应用程序。

For this, I use Eclipse on my Windows PC and then transfer the .jar file into my "smaller" system that operates with Windows CE. 为此,我在Windows PC上使用Eclipse,然后将.jar文件传输到与Windows CE一起运行的“较小”系统中。 The .jar file is then executed with the Mysaifu JVM (because we need a JVM to execute a Java program in Windows CE). 然后,使用Mysaifu JVM执行.jar文件(因为我们需要JVM才能在Windows CE中执行Java程序)。

So I started with a simple application that will launch a window (with JFrame) and when I tried to execute it, I got an error message : 因此,我从一个简单的应用程序开始,它将启动一个窗口(使用JFrame),当我尝试执行该窗口时,出现了一条错误消息:

java.lang.UnsatisfiedLinkError: Native library 'wcepeer' not found (as file 'wcepeer') in gnu.classpath.boot.library.path and java.library.path java.lang.UnsatisfiedLinkError:在gnu.classpath.boot.library.path和java.library.path中找不到本地库“ wcepeer”(作为文件“ wcepeer”)

I've tried to verify if the file representing the native library ( wcepeer.dll ) is in the correct folder, and I could see that the file is there with another library files, for example wcesound.dll , wcesecurity.dll , etc. Normally these files are provided in Program Files/Mysaifu JVM/jre/bin when I installed the JVM on my Windows CE system. 我尝试验证表示本机库( wcepeer.dll )的文件是否在正确的文件夹中,并且可以看到该文件与其他库文件一起存在,例如wcesound.dllwcesecurity.dll等。通常,当我在Windows CE系统上安装JVM时,这些文件在Program Files / Mysaifu JVM / jre / bin中提供。

I've also tried to verify the presence of the wcepeer library with System.loadLibrary() : 我还尝试使用System.loadLibrary()验证wcepeer库的存在:

  try { System.loadLibrary("wcepeer"); } catch(UnsatisfiedLinkError e) { System.err.println("Native code library failed to load.\\n" + e); } 

The result was : 结果是:

Native code library failed to load. 本机代码库无法加载。 java.lang.UnsatisfiedLinkError: Native library 'wcepeer' not found (as file 'wcepeer') in gnu.classpath.boot.library.path and java.library.path java.lang.UnsatisfiedLinkError:在gnu.classpath.boot.library.path和java.library.path中找不到本地库“ wcepeer”(作为文件“ wcepeer”)

However when I replaced "wcepeer" with "wcesound" for example, there was no error. 但是,例如,当我用“ wcesound”替换“ wcepeer”时,没有错误。 So I suppose that there's a problem with the wcepeer.dll file, but I've no idea how to solve it. 因此,我认为wcepeer.dll文件存在问题,但我不知道如何解决。 I searched everywhere on the net, there's only a forum about this but it doesn't help too much. 我在网上到处搜索,只有一个关于此的论坛,但并没有太大帮助。

Thanks in advance for helping. 在此先感谢您的帮助。

Kindly regards, 亲切的问候,

You can use dependency walker ( http://www.dependencywalker.com/ ) to open your DLL (it works also on CE dlls, since they use the same format as Windows ones) and see what dependencies this DLL has. 您可以使用依赖关系行程序( http://www.dependencywalker.com/ )打开您的DLL(它也可用于CE dll,因为它们使用与Windows相同的格式),并查看此DLL具有哪些依赖关系。 It may be that other DLLs are required (if they are statically linked via export lib your DLL will fail to load anyway) or that the DLL requires some system DLLs or APIs that are not supported on your device. 可能是需要其他DLL(如果它们是通过export lib静态链接的,则您的DLL仍然无法加载),或者该DLL需要某些设备不支持的系统DLL或API。 Windows CE is a componentized OS so you may have a different set of APIs, depending on the components you included in the OS image. Windows CE是一个组件化的操作系统,因此您可能具有不同的API集,具体取决于操作系统映像中包含的组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM