Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » native library in a web project
native library in a web project [message #208703] Mon, 18 February 2008 15:13 Go to next message
Eclipse UserFriend
Originally posted by: yair.sundaysky.com

hi all
i m using a jar in my web project which uses a native library. in the
build path i m adding the jar and edit its "native library location" with
the path of the library. this works fine for an application (run as java
aaplication). When i use it in a web application, the native library is
not working. how can make the web application know of the native library?
thanks
yair
Re: native library in a web project [message #208786 is a reply to message #208703] Tue, 19 February 2008 17:21 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
yair wrote:
> hi all
> i m using a jar in my web project which uses a native library. in the
> build path i m adding the jar and edit its "native library location"
> with the path of the library. this works fine for an application (run as
> java aaplication). When i use it in a web application, the native
> library is not working. how can make the web application know of the
> native library?
> thanks
> yair
>
>

I believe it's the JVM running the server that will need to "know" of
your library so it can be used by your web application. This is
possible for Tomcat and I assume other servers in WTP as well. The
exact details will depend on your version of Eclipse, OS, possibly JVM,
and which server.

Cheers,
Larry
Re: native library in a web project [message #208852 is a reply to message #208786] Wed, 20 February 2008 17:33 Go to previous messageGo to next message
Wolfgang Röckelein is currently offline Wolfgang RöckeleinFriend
Messages: 122
Registered: July 2009
Senior Member
Hi,

Larry Isaacs wrote:
> I believe it's the JVM running the server that will need to "know" of
> your library so it can be used by your web application. This is
> possible for Tomcat and I assume other servers in WTP as well. The
> exact details will depend on your version of Eclipse, OS, possibly JVM,
> and which server.

Do you know how this is possible for Tomcat6 and WTP (Besides defining a startup directory with all the DLLs)?

Thanks,
Wolfgang
Re: native library in a web project [message #208868 is a reply to message #208852] Wed, 20 February 2008 19:11 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Wolfgang Röckelein wrote:
> Hi,
>
> Larry Isaacs wrote:
>> I believe it's the JVM running the server that will need to "know" of
>> your library so it can be used by your web application. This is
>> possible for Tomcat and I assume other servers in WTP as well. The
>> exact details will depend on your version of Eclipse, OS, possibly
>> JVM, and which server.
>
> Do you know how this is possible for Tomcat6 and WTP (Besides defining a
> startup directory with all the DLLs)?
>
> Thanks,
> Wolfgang

I think the simplest way is to open the Run Configuration for the Tomcat
server and go to the Environment tab. Manually specify a PATH
environment variable that includes all paths needed to find the desired
DLLs. Since this setting would replace the default PATH value, include
any additional paths needed by Tomcat. If you haven't customized your
Tomcat, there shouldn't be any additional paths needed. The PATH
setting will get added to the "java.library.path" System property and
the JVM should be able to find your DLLs.

Cheers,
Larry
Re: native library in a web project [message #208885 is a reply to message #208868] Thu, 21 February 2008 08:05 Go to previous message
Eclipse UserFriend
Originally posted by: yair.sundaysky.com

> I think the simplest way is to open the Run Configuration for the Tomcat
> server and go to the Environment tab. Manually specify a PATH
> environment variable that includes all paths needed to find the desired
> DLLs. Since this setting would replace the default PATH value, include
> any additional paths needed by Tomcat. If you haven't customized your
> Tomcat, there shouldn't be any additional paths needed. The PATH
> setting will get added to the "java.library.path" System property and
> the JVM should be able to find your DLLs.

> Cheers,
> Larry

thanks for your answer.

There is no way to specify this in the web-project properties (as in a
regular java project)?
i guess i won't have any choice but to add a little "readme" file to the
project, explaining where to put the dlls when installing...

thanks
yair
Previous Topic:Re: xml editor content assist
Next Topic:"J2EE Module dependencies"
Goto Forum:
  


Current Time: Fri Apr 19 12:49:49 GMT 2024

Powered by FUDForum. Page generated in 0.02090 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top