[vtkusers] vtkMy and Java wrapping

Robert Haines rhaines at manchester.ac.uk
Mon Mar 16 06:56:44 EDT 2009


Hi all,

When using the vtkMy example as a base for writing my own classes I've  
noticed a few niggles when wrapping them to Java. Generally it works  
fine but it writes out the .java files to the vtkmy directory but  
declares each generated class to be in package vtk. This means that  
javac will not find the classes while compiling them. It's easy enough  
to change the output of the .java files to a vtk directory but I think  
the point here is that the Java wrapping code should be able to  
declare the classes to be in different packages. It doesn't seem  
sensible that all these extra classes should go into the vtk  
namespace. Unfortunately, upon investigation of all this, it appears  
that vtkWrapJava is hardcoded to output all classes in package vtk.

At the very minimum there is a bug here in the mismatch that vtkMy is  
set up to output wrapped classes to the vtkmy directory while  
declaring them as being in package vtk.

I'd rather vtkWrapJava was changed to allow wrapped classes to be  
declared in packages other than vtk, so should I submit this as a bug  
report or is it one of those times where it'll get fixed quicker if I  
do the patches myself? :-) I'm happy to do the latter if someone with  
more knowledge of the Java wrapping code is willing to drop me the odd  
bit of advice here and there and cast an eye over the results. Equally  
if this sort of change isn't welcome and isn't going to go into vtk if  
I do it I'd rather know before I start! (Maybe it's already fixed for  
5.4?)

Any help/advice welcome,
Cheers,
Rob

-- 
Robert Haines

Research Associate, RealityGrid          Tel. : +44 (0)161 275 6067
Research Computing Services              Fax. : +44 (0)161 275 0637
University of Manchester                 Email: rhaines at manchester.ac.uk
Oxford Road                              Web  : www.realitygrid.org
Manchester, M13 9PL                           : www.rcs.manchester.ac.uk




More information about the vtkusers mailing list