• Post Reply Bookmark Topic Watch Topic
  • New Topic

jni from web application

 
Kike Pedraza
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, i am desperate, i'm sure this is very easy but can't find any information about it... well, i find a lot of references saying 'other approaches...' but don't know where else to find. Ok, here it goes.

I am accessing c functions from a console application with j2se. No prob about that. Now I want to integrate it in my j2ee application (running under jboss). Where can i find information about that? (for example, where should i place the dll?).

tx in advance.
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kike Pedraza:
for example, where should i place the dll?


Welcome to the JavaRanch.
The answer to your question is:

the Java virtual machine needs to be able to find the native library. To do this, set the library path to the current directory as follows:

Unix or Linux:
LD_LIBRARY_PATH=`pwd`
export LD_LIBRARY_PATH


Windows NT/2000/95:
set PATH=%path%;.

JNI Tutorial: JNI Example
Of course, rather than the "current directory", you would either create a new library directory and add it to the path or move the dll to an existing directory already on the path.
[ March 28, 2007: Message edited by: Joe Ess ]
 
Kike Pedraza
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tx
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!