You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ed <ed...@gmail.com> on 2007/11/06 23:17:26 UTC

shared library in executable jar file

Where do I configure to have a shared library file included correctly in an
executable assembly file?
I've been looking in the assembly plugin area with no luck.

When I try to run the executable jar file I get an
UnsatisfiedLinkError:Expecting an absolute path of the library:

I'm assembling an executable jar file and I need a shared library to be
assembled in the file and effectively in the LD_LIBRARY_PATH.

When I run
mvn package assembly:assembly

I'd like the libmylib.so file to be in the executable assembly and in the
load path.

In eclipse, I simply put the file in the
mylib/src/main/java/resources/org/mylib/socket directory and maven places
the file in the
mylib/target/classes/org/mylib/socket/ directory when I run
mvn compile

I can the execute the file.

When I try to run the executable jar file I get an
UnsatisfiedLinkError:Expecting an absolute path of the library:

Thanks in advance,

-- 
Ed

Re: shared library in executable jar file

Posted by Heinrich Nirschl <he...@gmail.com>.
On Nov 6, 2007 11:17 PM, Ed <ed...@gmail.com> wrote:
> Where do I configure to have a shared library file included correctly in an
> executable assembly file?
> I've been looking in the assembly plugin area with no luck.
>
> When I try to run the executable jar file I get an
> UnsatisfiedLinkError:Expecting an absolute path of the library:
>
> I'm assembling an executable jar file and I need a shared library to be
> assembled in the file and effectively in the LD_LIBRARY_PATH.
>
> When I run
> mvn package assembly:assembly
>
> I'd like the libmylib.so file to be in the executable assembly and in the
> load path.
>
> In eclipse, I simply put the file in the
> mylib/src/main/java/resources/org/mylib/socket directory and maven places
> the file in the
> mylib/target/classes/org/mylib/socket/ directory when I run
> mvn compile
>
> I can the execute the file.
>
> When I try to run the executable jar file I get an
> UnsatisfiedLinkError:Expecting an absolute path of the library:

I don't think that what you want is possible. The native library has
to be loaded by the OS and therefore cannot be placed inside the jar.

- Henry

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org