Hi,

You can use -Djava.library.path=/your/path to set the library path as a
command line argument during the startup of tomcat in tomcat.sh.

I faced this problem when I have not prepended the package name with Java
method name i.e. the stub class which I was using is named abc and the
function name print as

package com.xyz;
class abc
{
    public native static void print();
}

and I generated the header file in the directory containg abc class and name
of my C function is Java_abc_print(). Which is not correct. Actually it
should be Java_com_xyz_abc_print() which is generated by using the command

user@host:> javah -jni com/xyz/abc

I think it may help.

with regards,

Muhammad Irfan Khan
----- Original Message -----
From: "FiFO d POOH" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 10:09 AM
Subject: Re: LD_LIBRARY_PATH


> i already tried to run my class(uses the native libraries) on the
commandline. but,
> the problem is when i got to use that class inside my
servlet......there....the
> problem
> starts.
>
> thanks!
>
> "Noel E. Lecaros" wrote:
>
> > Hi,
> >
> > Have you tried writing and executing a test class from the command line?
I'm only
> > guessing, but there might be classloading or security issues with the
Tomcat
> > container vis-a-vis the servlet.  If this works, see if you can write
your servlet
> > to call that test class's method instead of directly implementing the
native
> > method.
> >
> > Hope this helps.
> >
> > Regards,
> > Noel Lecaros
> >
> > FiFO d POOH wrote:
> >
> > > i already try this but still java.lang.UnsatisfiedLinkError Throwable
is being
> > > thrown.
> > > tomcat cant still find the native libraries. am using solaris.
> > >
> > > Alex Amies wrote:
> > >
> > > > put the following line in your '.profile', '.bashrc', or '.cshrc',
> > > > or type it at the command prompt before starting the server:
> > > >
> > > > export LD_LIBRARY_PATH=path_your_want:more_stuff_delimited_by_colons
> > > >
> > > > You will need it if you are using native libraries in your servlets
> > > > and those native libraries are not in standard locations such as
> > > > /usr/lib, etc.  I am assuming Solaris or Linux.
> > > >
> > > > -----Original Message-----
> > > > From: Noel E. Lecaros [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, May 03, 2001 7:44 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: LD_LIBRARY_PATH
> > > >
> > > > FiFO d POOH wrote:
> > > >
> > > > >  how to set my LD_LIBRARY_PATH in tomcat?
> > > > >  thanks in advance!
> > > > >
> > > > > pipo
> > > > >
> > > > >
> > > >
________________________________________________________________________
> > > > ___
> > > > > To unsubscribe, send email to [EMAIL PROTECTED] and include in
the
> > > > body
> > > > > of the message "signoff SERVLET-INTEREST".
> > > > >
> > > > > Archives:
http://archives.java.sun.com/archives/servlet-interest.html
> > > > > Resources:
> > > > http://java.sun.com/products/servlet/external-resources.html
> > > > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > > >
> > > > Hi,,
> > > >
> > > > What do you want to put in LD_LIBRARY_PATH?  As far as I know,
setting
> > > > up
> > > > Tomcat does not require setting anything here.  If what you want is
to
> > > > be able
> > > > to dynamically alter LD_LIBRARY_PATH within Tomcat, why would you
want
> > > > to do
> > > > that?
> > > >
> > > > Regards,
> > > > Noel Lecaros
> > > >
> > > >
________________________________________________________________________
> > > > ___
> > > > To unsubscribe, send email to [EMAIL PROTECTED] and include in
the
> > > > body
> > > > of the message "signoff SERVLET-INTEREST".
> > > >
> > > > Archives:
http://archives.java.sun.com/archives/servlet-interest.html
> > > > Resources:
http://java.sun.com/products/servlet/external-resources.html
> > > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > > >
> > > >
___________________________________________________________________________
> > > > To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
> > > > of the message "signoff SERVLET-INTEREST".
> > > >
> > > > Archives:
http://archives.java.sun.com/archives/servlet-interest.html
> > > > Resources:
http://java.sun.com/products/servlet/external-resources.html
> > > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> > > -
> > >
> > >
___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> --
> Wilfredo Sellado, ABTIK
> Software Design Engineer
> NEC Telecom Software Phils., Inc.
> 11th Flr. Keppel Center, Cebu Business Park
> Cebu City, Philippines 6000
> Office   : +63(32)233-9142
> Residence: +63(32)412-8350
> Mobile   : +63(919)362-9019
> Email    : <[EMAIL PROTECTED]>
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to