[vtkusers] vtkPanel.java and packages

Jeff Lee jeff at cdnorthamerica.com
Tue Apr 30 12:19:36 EDT 2002


btw, you at least need to rebuild Rendering after your update because 
vtkJavaAwt.h has changed.
-Jeff

Phil Cook wrote:

>This from the archives of Feb 02:
>
>
>>Hi Jason,
>>The native methods get mangled in a certain way so that java can find 
>>them  The method is defined in libvtkCommonJava.so as 
>>Java_vtkPanel_SetSizeInternal(...) (see vtkJavaAwt.h).  Because you put 
>>vtkPanel into a package, java is looking for somtehing like 
>>Java_vtk_vtkPanel_SetSizeInternal(...).  You can see exactly which 
>>method java is looking for if you type 'javah -jni vtkPanel'.  Because 
>>of the way vtk is built, you cannot put vtkPanel into a package.  Take 
>>the package declaration out of vtkPanel and change your other code to 
>>look for vtkPanel, not vtk.vtkPanel.  Of course, vtkPanel needs to be 
>>somewhere in your CLASSPATH...
>>-Jeff
>>
>>Rodrigues, Jason (MED) wrote:
>>
>>> 
>>>Hye all,
>>>
>>>I downloaded vtk4.0 for upgrading my vtkPrograms to new vresion from the
>>>site, but  found that vtk.vtkPanel didnt exist in that package. so made a
>>>separate packeg just for vtkPanel. Now Whenever I call this vtkPanel from
>>>that Package  It throws me an unsatisfied linker error as below.
>>>
>>>
>>>java.lang.UnsatisfiedLinkError: SetSizeInternal
>>>	at vtktmp.vtkPanel.SetSizeInternal(Native Method)
>>>	at vtktmp.vtkPanel.setSize(vtkPanel.java:62)
>>>	at vtkexample.<init>(vtkexample.java:11)
>>>	at vtkexample.main(vtkexample.java:26)
>>>
>>>Following was the place where there was a native call for setting the Size
>>>of the vtkPanel
>>> private native void RenderCreate(vtkRenderWindow id0);
>>> private native void RenderInternal(vtkRenderWindow id0);
>>> private native void SetSizeInternal(vtkRenderWindow id0, int x, int y);
>>>
>>>
>>>Thought The vtkPanel class had sucessfully loaded the libraries int the
>>>vtkPanel program,
>>>              System.loadLibrary("vtkCommonJava"); 
>>>              System.loadLibrary("vtkFilteringJava");
>>>              System.loadLibrary("vtkIOJava");
>>>              System.loadLibrary("vtkImagingJava");
>>>              System.loadLibrary("vtkGraphicsJava");
>>>              System.loadLibrary("vtkRenderingJava");
>>>the above linker error still existed.
>>>Can anybody tell me what other things I need to include other than the
>>>vtkLibraries? If I have to build other dependencies where do I get those dll
>>>making 'make" files?
>>>
>>>
>>>Anticipating your solution at the earliest,
>>>Regards,
>>>JASON RODRIGUES
>>>
>>>
>>>"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
>>>ADDRESSEE and may contain confidential and privileged information.
>>>If the reader of this message is not the intended recipient,
>>>you are notified that any dissemination, distribution or copy of this 
>>>communication is strictly Prohibited. 
>>>If you have received this message by error, please notify us 
>>>immediately, return the original mail to the sender and delete the 
>>>message from your system."
>>>
>>>_______________________________________________
>>>This is the private VTK discussion list. 
>>>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>>>Follow this link to subscribe/unsubscribe:
>>>http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>
>
>I have done as Jeff suggested, but my Java compiler (Sun JDK v1.4.0 for Win32) won't 
>recognise unpackaged classes. Although I have put \vtk40\wrapping\java on the 
>classpath, I get "Cannot resolve symbol" when attempting to instantiate vtkPanel 
>objects. 
>
>I have used packages for all my code, and if I put vtkPanel into any of my packages (or 
>into the vtk package), it can be found by the compiler. But then I get the same runtime 
>problems as Jason had.
>
>Has anyone else come across this problem? 
>
>Thanks,
>
>
>Phil
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>

-- 
Jeff Lee 
Software Engineer jeff at cdnorthamerica.com
CD North America
21 Lafayette Street, Suite 230
Lebanon, NH 03766
Tel:    (603) 643-9993 ext. 109
Fax:    (603) 643-9994 






More information about the vtkusers mailing list