My servlet have to call a JNI method and I am using servletrunner to test.
Both servlet and the map.dll is in the d:\witsservlet directory and I use
command line to specify this directory for servlet runner. Here is relevant
code:

  private native static void  reverseMap(String roverName, int date, int
cycIdx,
    int panIdx, int wdgIdx, float x, float y,Reverse_Map_Report
reverseMapData);

      static {
            //System.loadLibrary("map");
            System.load("d:\\witsservlet\\map.dll");
     }
public void  doGet (
   HttpServletRequest   req,
   HttpServletResponse  res ) {
..............................
    reverseMap(roverName,date,cycIdx,panIdx,wdgIdx,x,y,reverseMpData);
............
}
But get:
reversemapServlet: init
java.lang.UnsatisfiedLinkError: reverseMap
        at reversemapServlet.doGet(reversemapServlet.java:121)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at
sun.servlet.http.HttpServerHandler.sendResponse(HttpServerHandler.java:162)
        at sun.servlet.http.HttpServerHandler.handleConnection(Compiled Code)
        at sun.servlet.http.HttpServerHandler.run(Compiled Code)
        at java.lang.Thread.run(Thread.java:466)

But if I construct a main method and invoke it on command line as

java revermapServlet

Everything works fine.

Thanks

Bing

___________________________________________________________________________
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