blayfk
asked on
java.lang.UnsatisfiedLinkError: no jhdf5 in java.library.path
hi
I have some .dll files(jhdf5.dll and jhdf.dll) in win folder I will like to load on windows XP.
I first tried the following two setups in my batch file but I'm still getting errors
1. java -Djava.library.path=./plug ins/ncsa.h df/resourc es/win/
2. java -Djava.library.path=C:/myP roduct/plu gins/ncsa. hdf/resour ces/win/
Can someone tells me whats wrong with my settings
java.lang.UnsatisfiedLinkE rror: no jhdf5 in java.library.path
at java.lang.ClassLoader.load Library(Un known Source)
at java.lang.Runtime.loadLibr ary0(Unkno wn Source)
at java.lang.System.loadLibra ry(Unknown Source)
at ncsa.hdf.hdf5lib.H5.<clini t>(H5.java :234)
at ncsa.hdf.hdf5lib.HDF5Const ants.<clin it>(HDF5Co nstants.ja va:494)
at ncsa.hdf.object.h5.H5File. <init>(H5F ile.java:1 67)
at ncsa.hdf.object.h5.H5File. <init>(H5F ile.java:1 06)
at sun.reflect.NativeConstruc torAccesso rImpl.newI nstance0(N ative Method)
I have some .dll files(jhdf5.dll and jhdf.dll) in win folder I will like to load on windows XP.
I first tried the following two setups in my batch file but I'm still getting errors
1. java -Djava.library.path=./plug
2. java -Djava.library.path=C:/myP
Can someone tells me whats wrong with my settings
java.lang.UnsatisfiedLinkE
at java.lang.ClassLoader.load
at java.lang.Runtime.loadLibr
at java.lang.System.loadLibra
at ncsa.hdf.hdf5lib.H5.<clini
at ncsa.hdf.hdf5lib.HDF5Const
at ncsa.hdf.object.h5.H5File.
at ncsa.hdf.object.h5.H5File.
at sun.reflect.NativeConstruc
Your lib path is incorrect - http://www.hdfgroup.org/hdf-java-html/hdf-object/use.html#libpath
Check the link and see the path as it dependent on the OS
Check the link and see the path as it dependent on the OS
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No. Try
java -Djava.library.path=.\plugins\ncsa.hdf\resources\win\;C:\myProduct\plugins\ncsa.hdf\resources\win
I would make both paths absolute though
Also check follwonig
if you are using System.load(...), pass the complete file name with extension and path
Alternatively you can use System.loadLibrary(...),where you do not pass the library extension, just add your library path to java -Djava.library.path
and try
if you are using System.load(...), pass the complete file name with extension and path
Alternatively you can use System.loadLibrary(...),where you do not pass the library extension, just add your library path to java -Djava.library.path
and try
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
a_b,
your link is helpful but what I want to do is set these .dll in my application so that a user will run the application straight away but not necessarily setting the environmental variables. I run my application from run.bat or .exe files.
your link is helpful but what I want to do is set these .dll in my application so that a user will run the application straight away but not necessarily setting the environmental variables. I run my application from run.bat or .exe files.
then you set environment variables in your bat file. Keep your libraries in your JDK lib folder.
I believe any way you will be providing JAVA_HOME.
I believe any way you will be providing JAVA_HOME.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://forums.sun.com/thread.jspa?threadID=672024
http://support.dtsearch.com/dts0198.htm
http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was40.doc/html/DB_Connections_Connection_Pooling/swg21223798.html