<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<P><FONT size=2><FONT face="Courier New">Can anyone shed light on this ?<BR>I'm
attempting to use Microsoft's VJ# (java code)with vtk40 running under
XP.</FONT></FONT></P>
<P><FONT size=2><FONT face="Courier New">I downloaded the dlls from the vtk
website and did not rebuild them, nor did I rebuild the vtk.jar. <BR><BR>MSDN
support asks :<BR><BR>Are the <STRONG>DLLs native Win32/COM Dlls</STRONG> or are
they containing embedded .class &<BR>resource files (Like is possible using
the JExeGen tool of VJ6).<BR><BR>If the DLLs are native Win32 Dlls being
accessed through JNI, then this is<BR>not supported in Visual J#. You will have
to move to using P/Invoke or COM<BR>inter-op services of .NET Fx.<BR><BR>If on
the other hand, these DLLs contain embedded .class/resource files,<BR>then you
need to convert the classes to managed assemblies before using in<BR>VJ# app.
For this you can use the VJ# binary converter tool (JbImp.exe).<BR>When using
JbImp.exe - please confirm that there are no legal restrictions<BR>from the
vendor of the .class files on doing a binary conversion. Note, that<BR>JbImp
does not support extracting embedded .class files in Win32 Dlls. The<BR>tool
must be run on the original .class files on which JExeGen (or similar<BR>tool)
was run.<BR>Regarding the behaviour of System.loadLibrary, we follow the same
semantics<BR>as the Win32 LoadLibrary API. If a path is specified then the DLL
is looked<BR>for in that path. If no path is specified then the search
heuristics of the<BR>Win32 LoadLibrary API is followed. The MSDN documentation
for Win32<BR>LoadLibrary API has these heuristics.<BR><BR>-----Original
Message-----<BR>From: vtkusers-admin@public.kitware.com<BR>[</FONT><A
href="mailto:vtkusers-admin@public.kitware.com"><FONT
face="Courier New">mailto:vtkusers-admin@public.kitware.com</FONT></A><FONT
face="Courier New">]On Behalf Of Bob Palank<BR>Sent: Tuesday, August 20, 2002
4:14 PM<BR>To: vtkusers@public.kitware.com<BR>Subject: [vtkusers] vtk and
Java<BR><BR><BR>Running in Borland JBuilder 60 - Java under XP Pro<BR><BR>1. I
Rebuild the project and the build succeeds.<BR>2. Project runs fine when the
lines below are commented out.<BR> // vtkConeSource cone
= new vtkConeSource();<BR> // cone.SetHeight( 3.0
);<BR> // cone.SetRadius( 1.0
);<BR> // cone.SetResolution( 10 );<BR>3. when //
vtkConeSource cone = new vtkConeSource(); is uncommented, the<BR>build fails
with the following error.<BR>"cone02.java": Error #: 300 : class vtkConeSource
not found in class<BR>cone02.cone02 at line 27, column 6<BR><BR>4. I thought the
import vtk.*; and System.loadLibrary() should get me beyond<BR>this point, but I
must be missing something!<BR><BR>TIA<BR> Bob Palank<BR><BR>Fortunately, I
had this running before I did a system rebuild!<BR>The tutorial code
follows.<BR><BR><BR><BR> =============================================================<BR>Java
Code
follows:<BR>//
Source vtk Tutorial Step 1.<BR><BR>//<BR>// This example creates a polygonal
model of a cone, and then rendered it to<BR>// the screen. It willrotate the
cone 360 degrees and then exit. The basic<BR>// setup of source -> mapper
-> actor -> renderer -> renderwindow is<BR>// typical of most VTK
programs.<BR>//<BR><BR>package cone02;<BR>import vtk.*; // be sure to add
a Path to d:\windows\system32 for vtk.jar<BR><BR>public class cone02 {<BR>
static {<BR>
System.loadLibrary("vtkCommonJava");<BR>
System.loadLibrary("vtkFilteringJava");<BR>
System.loadLibrary("vtkIOJava");<BR>
System.loadLibrary("vtkImagingJava");<BR>
System.loadLibrary("vtkGraphicsJava");<BR>
System.loadLibrary("vtkRenderingJava");<BR> /*
======================================================<BR>
======================================================= */<BR>}<BR><BR>
public static void main(String[] args) {<BR><BR> //
vtkConeSource cone = new vtkConeSource();<BR> //
cone.SetHeight( 3.0 );<BR> // cone.SetRadius( 1.0
);<BR> // cone.SetResolution( 10
);<BR><BR><BR><BR> System.out.println("20Aug02 Pass
05");<BR><BR>
}<BR>}<BR><BR>_______________________________________________<BR>This is the
private VTK discussion list.<BR>Please keep messages on-topic. Check the FAQ at:
<</FONT><A href="http://public.kitware.com/cgi-bin/vtkfaq"
target=_blank><FONT
face="Courier New">http://public.kitware.com/cgi-bin/vtkfaq</FONT></A><FONT
face="Courier New">><BR>Follow this link to
subscribe/unsubscribe:<BR></FONT><A
href="http://public.kitware.com/mailman/listinfo/vtkusers" target=_blank><FONT
face="Courier New">http://public.kitware.com/mailman/listinfo/vtkusers</FONT></A></FONT><FONT
face="Courier New"> </FONT></P></BODY></HTML>