You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Twiggs, Glenn" <Gl...@bmc.com> on 2000/08/30 22:16:43 UTC

A home for native libraries

I have a servlet that, horror of all horrors, requires native libraries.
Where should they be placed, and how is Tomcat notified of their location?

Ideally, I would like to place them in:

	webapps/<my-app>/WEB-INF/bin/

And not have to worry about updating the native PATH variable before
starting Tomcat. Any suggestions/ideas? The 2.2 & 2.3 servlet specifications
make no mention of native code access.

Glenn.

Re: A home for native libraries

Posted by "Pier P. Fumagalli" <pi...@eng.sun.com>.
As far as I can see in the JNI documentation, you can also specify
something like "-Djava.library.path=..."  as a command line parameter.
It should load the VMs.

The problem with native libraries is that they're not loaded by a
classloader from a file (such as JARs), but its access is performed by
the underlying os routines, and you need to have those libraries where
the OS can access them...

	Pier

James Cook wrote:
> 
> This should give you an idea. I am pretty sure that the loading of native code
> is outside of the spec and tomcat's mission.
> 
> http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/_library.html
> 
> jim
> 
> ----- Original Message -----
> From: "Twiggs, Glenn" <Gl...@bmc.com>
> To: <to...@jakarta.apache.org>
> Sent: Wednesday, August 30, 2000 4:16 PM
> Subject: A home for native libraries
> 
> > I have a servlet that, horror of all horrors, requires native libraries.
> > Where should they be placed, and how is Tomcat notified of their location?
> >
> > Ideally, I would like to place them in:
> >
> > webapps/<my-app>/WEB-INF/bin/
> >
> > And not have to worry about updating the native PATH variable before
> > starting Tomcat. Any suggestions/ideas? The 2.2 & 2.3 servlet specifications
> > make no mention of native code access.
> >
> > Glenn.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

Re: A home for native libraries

Posted by James Cook <ji...@iname.com>.
This should give you an idea. I am pretty sure that the loading of native code
is outside of the spec and tomcat's mission.

http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/_library.html

jim

----- Original Message -----
From: "Twiggs, Glenn" <Gl...@bmc.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, August 30, 2000 4:16 PM
Subject: A home for native libraries


> I have a servlet that, horror of all horrors, requires native libraries.
> Where should they be placed, and how is Tomcat notified of their location?
>
> Ideally, I would like to place them in:
>
> webapps/<my-app>/WEB-INF/bin/
>
> And not have to worry about updating the native PATH variable before
> starting Tomcat. Any suggestions/ideas? The 2.2 & 2.3 servlet specifications
> make no mention of native code access.
>
> Glenn.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>