Hi All,

I downloaded and installed on Windows98 the Java version of Vtk (a library fo 
scientific visualization)from http://public.kitware.com/vtkhtml/getSoftware.html 
(files vtk32Core.exe (2.25MB) and vtk32Java.exe (0.84MB)).

I wrote the code below:

import vtk.*;

public class vrmlexporter {
  static { System.loadLibrary("vtkJava"); }

  static void export(String infile, String outfile, double thr) {
   vtkDataSetReader reader = new vtkDataSetReader();
  }

  public static void main (String args[]) {
       export("volume.vtk", "soft.wrl", 30);
  }

}

and when I run it as application it works without errors.


I included the vrmlexporter  in a Tomcat servlet as in the code below:

//primo.javaGood

 import java.io.*;
 import java.util.*;
 import java.sql.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import vtk.*;

 public class primo extends HttpServlet{

   public void doGet (HttpServletRequest request,HttpServletResponse response) throws 
ServletException,IOException {
      vrmlexporter.export("c:/roberto/tommy/code/exporter/volume.vtk", "soft.wrl", 30);
   }
 }

 class vrmlexporter {

   static { System.loadLibrary("vtkJava"); }

   static void export(String infile, String outfile, double thr) {
        vtkDataSetReader reader = new vtkDataSetReader();
        }
 }

I run in the following error:

java.lang.UnsatisfiedLinkError: VTKInit
        at vtk.vtkDataSetReader.VTKInit(Native Method)
        at vtk.vtkObject.(vtkObject.java:97)
        at vtk.vtkProcessObject.(vtkProcessObject.java:78)
        at vtk.vtkSource.(vtkSource.java:82)
        at vtk.vtkDataReader.(vtkDataReader.java:259)
        at vtk.vtkDataSetReader.(vtkDataSetReader.java:50)
        at vrmlexporter.export(primo.java:1424)
        at primo.doGet(primo.java:169)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)

Could you please advice?

Thanks in advance.

    Roberto

___________________________________________________________________________
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