简体   繁体   English

java.lang.UnsatisfiedLinkError:java.library.path中没有frmjapi

[英]java.lang.UnsatisfiedLinkError: no frmjapi in java.library.path

I have a project on eclipse that I'm working on and I'm using it on an XP 32-bit machine, I want to move the project to my PC which is Windows 7 64-bit. 我正在处理一个关于eclipse的项目,并且正在XP 32位计算机上使用它,我想将该项目移至我的PC(Windows 7 64位)。 I can compile my project without errors, but when I run it, I get the error Exception in thread "main" java.lang.UnsatisfiedLinkError: no frmjapi in java.library.path . 我可以编译我的项目而没有错误,但是当我运行它时,我Exception in thread "main" java.lang.UnsatisfiedLinkError: no frmjapi in java.library.path得到错误Exception in thread "main" java.lang.UnsatisfiedLinkError: no frmjapi in java.library.path I looked for the error in other posts but most of them were dealing with native libraries, my project only contains this 1 jar file. 我在其他帖子中查找了错误,但是其中大多数都在处理本机库,我的项目仅包含此1个jar文件。 I tried removing and adding the project to the build path many times but the problem persists. 我尝试了多次删除项目并将其添加到生成路径,但是问题仍然存在。 What could be the reason behind this issue? 这个问题背后的原因可能是什么?

The reason is that obviously your library behind the scene relies on a native library at runtime, so you need to add the root directory of the file frmjapi.dll to java.library.path as suggested in your error message by adding -Djava.library.path=c:\\some\\path\\to\\my\\dll\\parent\\dir in your VM arguments (cf. Run Configuration). 原因是显然您的后台库在运行时依赖于本机库,因此您需要按照错误消息中的建议,通过添加-Djava.library.path=c:\\some\\path\\to\\my\\dll\\parent\\dir将文件frmjapi.dll的根目录添加到java.library.path中。 VM参数中的 -Djava.library.path=c:\\some\\path\\to\\my\\dll\\parent\\dir (请参阅“运行配置”)。

What is frmjapi.dll ? 什么是frmjapi.dll

frmjapi.dll is a file from Oracle Corporation which is part of Oracle Developer . frmjapi.dllOracle Corporation的文件,它是Oracle Developer的一部分。 frmjapi.dll is located in doracledev10g\\bin\\frmjapi.dll . frmjapi.dll位于在doracledev10g\\bin\\frmjapi.dll

These errors normally creep up while dealing with native/platform specific applications like graphics or multi-media applications. 这些错误通常在处理本机/平台特定的应用程序(例如图形或多媒体应用程序)时逐渐增加。 Your code would compile fine because at compile time it only looks for immediate java dependencies and dont look for all runtime dependencies like .dll files. 您的代码可以很好地编译,因为在编译时它仅查找直接的Java依赖项,而不查找所有的运行时依赖项,例如.dll文件。 As you said, project has been moved from 32-bit to 64-bit platform. 如您所说,项目已从32位平台移至64位平台。 Make sure you have correct java version installed and linked in eclipse. 确保您已安装正确的Java版本并在Eclipse中链接。 Also, see what are the dependencies required by jar file included (does it support functionality on 64-bit machine). 另外,请查看包含的jar文件需要哪些依赖项(它支持64位计算机上的功能)。 Last but not the least try running project from outside IDE (making sure that it has all required permissions). 最后但并非最不重要的一点是尝试从外部IDE运行项目(确保它具有所有必需的权限)。

Other solution (related to problem with Jdapi for Oracle Forms) is to include the folder %ORACLE_HOME%\\bin in your path. 其他解决方案(与Jdapi for Oracle Forms的问题有关)是在路径中包含文件夹%ORACLE_HOME%\\bin Then you don't need to provide the -Djava.library.path argument to your java command line. 然后,您无需向Java命令行提供-Djava.library.path参数。

I used this in my .bat file before running my Jdapi Java program : 在运行Jdapi Java程序之前,我在.bat文件中使用了它:

set ORACLE_HOME=C:\Oracle\Forms12c\products\Oracle_Home
:: Only adds ORACLE_HOME\bin to the PATH if not already present
for %%X in (frmjapi.dll) do (set FOUND=%%~$PATH:X)
if not defined FOUND set PATH=%ORACLE_HOME%\bin;%PATH%

I tried to run jdapi in Windows 10 and ran into the problem. 我试图在Windows 10中运行jdapi并遇到问题。 The error message I had is "cannot find the dependent libraries" for frmjapi.dll. 我收到的错误消息是frmjapi.dll的“找不到依赖库”。

My solution to the problem is as the following: 我对这个问题的解决方法如下:

  1. Make sure %ORACLE_HOME%/bin is in the PATH . 确保%ORACLE_HOME%/binPATH (This can solve the issue of "no frmjapi in java.library.path" (这可以解决“ java.library.path中没有frmjapi”的问题
  2. Install Windows 10 SDK . 安装Windows 10 SDK (This can solve the issue of "invoking frmjapi.dll cannot find the dependent libraries) (这可以解决“调用frmjapi.dll找不到依赖库”的问题)

For more discussion about the dll missing problem, please see https://stackoverflow.com/a/35466136/7820390 有关dll丢失问题的更多讨论,请参见https://stackoverflow.com/a/35466136/7820390

Hope this help. 希望能有所帮助。

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

相关问题 java.lang.UnsatisfiedLinkError:否 <LIBRARY> 在java.library.path中 - java.lang.UnsatisfiedLinkError: no <LIBRARY> in java.library.path java.lang.UnsatisfiedLinkError:lsxbe(在java.library.path中找不到) - java.lang.UnsatisfiedLinkError: lsxbe (Not found in java.library.path) java.lang.unsatisfiedlinkerror:java.library.path中没有vtk CommonJava - java.lang.unsatisfiedlinkerror: no vtk CommonJava in java.library.path java.lang.UnsatisfiedLinkError:java.library.path中不这样 - java.lang.UnsatisfiedLinkError: no so in java.library.path 获取“java.lang.UnsatisfiedLinkError”:java.library.path 中没有 lwjgl - Getting 'java.lang.UnsatisfiedLinkError': no lwjgl in java.library.path java.lang.UnsatisfiedLinkError:java.library.path 中没有“somefile” - java.lang.UnsatisfiedLinkError: no "somefile" in java.library.path Netbeans:java.lang.UnsatisfiedLinkError:java.library.path 中没有启动画面: - Netbeans: java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path: java.lang.UnsatisfiedLinkError: java.library.path 中没有 nlsxbe - java.lang.UnsatisfiedLinkError: no nlsxbe in java.library.path 修复以下问题:java.lang.UnsatisfiedLinkError:java.library.path中没有附件 - Fix the: java.lang.UnsatisfiedLinkError: no attach in java.library.path java.lang.UnsatisfiedLinkError 在 java.library.path 中没有 *****.dll - java.lang.UnsatisfiedLinkError no *****.dll in java.library.path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM