UnsatisfiedLinkError for unix system

Hello,

I am developping a Java software that use the cdf library (cdf is a special file format )

I have compiled it in an executable jar file.

But I want it to be also runable under Unix.

Under Unix, when I try to open a cdf file the following exception is caught.

java.lang.UnsatisfiedLinkError: no cdfNativeLibrary in java.library.path

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1516)

at java.lang.Runtime.loadLibrary0(Runtime.java:788)

at java.lang.System.loadLibrary(System.java:834)

at gsfc.nssdc.cdf.CDFNativeLibrary.<clinit>(CDFNativeLibrary.java:47)

at gsfc.nssdc.cdf.CDF.open(CDF.java:275)

I have tow file libcdf.a and libcdf.sl

What are those extension ?

I do not know how to use them within the jar file of my program.

Could somebody help me ?

[859 byte] By [zinza] at [2007-11-27 11:55:17]
# 1

> Hello,

>

> I am developping a Java software that use the cdf

> library (cdf is a special file format )

> I have compiled it in an executable jar file.

>

> But I want it to be also runable under Unix.

Versus running it it something else?

> Under Unix, when I try to open a cdf file the

> following exception is caught.

>

> libcdf.a and libcdf.sl

> What are those extension ?

sl is a shared library.

a is just a library.

You would need the first during runtime if you linked the shared library for that target OS using that shared library. If you used the second then it is part of the shared library so you don't need it except when you link.

> I do not know how to use them within the jar file of

> my program.

The shared library must be in the shared library path of the target OS. How you set the shared library path on unix systems depends on the shell.

Note that none of that has anything to do with an executable jar. So if it is a shared library then it has to be outside the jar.

jschella at 2007-7-29 19:01:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...