1

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

hakuna matata
  • 3,243
  • 13
  • 56
  • 93

4 Answers4

1

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

What is frmjapi.dll?

frmjapi.dll is a file from Oracle Corporation which is part of Oracle Developer. frmjapi.dll is located in doracledev10g\bin\frmjapi.dll.

Nicolas Filotto
  • 43,537
  • 11
  • 94
  • 122
1

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. As you said, project has been moved from 32-bit to 64-bit platform. Make sure you have correct java version installed and linked in eclipse. Also, see what are the dependencies required by jar file included (does it support functionality on 64-bit machine). Last but not the least try running project from outside IDE (making sure that it has all required permissions).

Prateek Jain
  • 2,738
  • 4
  • 28
  • 42
0

Other solution (related to problem with Jdapi for Oracle Forms) is to include the folder %ORACLE_HOME%\bin in your path. Then you don't need to provide the -Djava.library.path argument to your java command line.

I used this in my .bat file before running my Jdapi Java program :

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%
R. Du
  • 544
  • 4
  • 16
0

I tried to run jdapi in Windows 10 and ran into the problem. The error message I had is "cannot find the dependent libraries" for frmjapi.dll.

My solution to the problem is as the following:

  1. Make sure %ORACLE_HOME%/bin is in the PATH. (This can solve the issue of "no frmjapi in java.library.path"
  2. Install Windows 10 SDK. (This can solve the issue of "invoking frmjapi.dll cannot find the dependent libraries)

For more discussion about the dll missing problem, please see https://stackoverflow.com/a/35466136/7820390

Hope this help.

CatSleeping
  • 81
  • 1
  • 3