- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I downloaded the daal update 2 and installed it on a windows system. I have been able to run the java examples using the .bat files. But, when I set up an Eclipse program, I am running into problems. The daal.jar is recognized (build goes through) but when I run an example, I get the following error:
Here I am running the simple LibraryVersionInfoExample
Exception in thread "main" java.lang.UnsatisfiedLinkError: no JavaAPI in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.intel.daal.service.LibraryVersionInfo.<clinit>(LibraryVersionInfo.java:47)
at com.intel.daal.examples.services.LibraryVersionInfoExample.main(LibraryVersionInfoExample.java:37)
Is this a recognized problem or is it just my setup.
Regards
Hemanth
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Was able to resolve the issue: I had not included the dll libraries in the System PATH. I added the following to the path variable;
.....\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\ia32_win\daal;
.....\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\ia32_win\tbb\vc_mt;
.....\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\ia32_win\compiler;
and it fixed the issue.
Regards
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This error is because Intel DAAL Java library requires a native library (JavaAPI.dll on Windows, libJavaAPI.so on Linux). And your Eclipse project does not find this native library. There're multiple ways to fix this. But the cleanest and simplest way is this:
- Create a new project in your IDE. Copy a DAAL example file into this project. In your case, you copy LibraryVersionInfoExample.java into your project.
- Configure Build Path. Click on the "Source" tab under "Java Build Path". Expand the src branch. Locate "Native library location" and double-click to edit it. Give it this value (using Windows as an example but Linux should be similar):
C:/Program Files (x86)/Intel_sw_development_tools/compilers_and_libraries_2016/windows/redist/intel64_win/daal - On the same window, click the "Libraries" tab. Click "Ad JARs" to add "daal.jar", which is found in the DAAL installation location on your computer.
- Click "OK" to save the configuration.
- Then select "Run Configurations" from the "Project" menu. Click the "Environment" tab.
- Add a new environment variable "Path". Give it this value:
C:\Program Files (x86)\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\intel64_win\daal;C:\Program Files (x86)\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\intel64_win\compiler;C:\Program Files (x86)\Intel_sw_development_tools\compilers_and_libraries_2016.0.049\windows\redist\intel64_win\tbb\vc_mt - Click "Apply" and close the window.
- Now your code should run correctly inside Eclipse.
We recognize that the current DAAL examples are not configured with IDE users in mind. It's not easy for a new user to use DAAL with a Java IDE. Hopefully, we will improve this in future releases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Zhang. That was helpful.
However for the Linux based Eclipse, I needed to do the following to make it work;
1. Add the daal.jar to the build path (step 3 from Zhang)
2. Then select "Run Configurations" from the "Project" menu. Click the "Environment" tab. Add a new environment variable "LD_LIBRARY_PATH". Give it this value: (similar to step 5 and 6 from Zhang) Note "LD_LIBRARY_PATH" and not "Path"
/opt/intel/compilers_and_
There was no need to add the Native Library Location under "Source" tab (step 2 from Zhang).
Thank you
Hemanth

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page