[vtk-developers] vtkWrapJava / package vtk;

Gerrick Bivins gbivins at objectreservoir.com
Thu Apr 16 10:07:57 EDT 2009


Actually, the package corresponds to the directory structure. The name of
the jar is irrelevant. In your case, place all your files in dir called vtk,
something like:

 jar cvf vtkgcm.jar vtk/*

Then loading vtkgcm.jar should work as expected.
See http://java.sun.com/docs/books/tutorial/deployment/jar/build.html
 for more info.
HTH
Gerrick

On 4/16/09 8:59 AM, "Mathieu Malaterre" <mathieu.malaterre at gmail.com> wrote:

> Hi Jeff,
> 
>   I was told that if you generate a file that start like this:
> 
> ...
> package vtk;
> ...
> 
>   It should end up in a jar file called 'vtk.jar'. Obviously I do not
> want to do that, because my 'vtk.jar' would clash with the regular
> vtk.jar file. I thought of generating a vtkgdcm.jar but apparently one
> user cannot load that file because of the hardcoded line 'package
> vtk;' ...
> 
> does this make sense ?
> 
> Thanks
> 
> On Thu, Apr 16, 2009 at 3:44 PM, Jeff Baumes <jeff.baumes at kitware.com> wrote:
>> I'm not sure of the issue here. The name of the jar file is
>> independent of the packages that it contains, so there would be no
>> issue with the file name. Is the issue that you want to put those
>> vtkObject subclasses into a different package called vtkgdcm?
>> 
>> Jeff
>> 
>> On Thu, Apr 16, 2009 at 6:33 AM, Mathieu Malaterre
>> <mathieu.malaterre at gmail.com> wrote:
>>> Hello fellow VTK/Java programmer,
>>> 
>>>  I am trying to generate a custom vtkgdcm.jar file out of a set of
>>> vtkObject derived classes. Unfortunately the vtkWrapJava app currently
>>> hardcode a line:
>>> 
>>> ...
>>> package vtk;
>>> import vtk.*;
>>> ...
>>> 
>>>  Which makes it impossible (AFAIK) to store into a jar file named
>>> 'vtkgdcm.jar'.
>>> 
>>>  Has anyone thought of a cross-platform solution (I cannot use 'sed').
>>> 
>>> Thanks,
>>> --
>>> Mathieu
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>> 
>>> 
>> 
>> 
>> 
>> --
>> Jeff Baumes, Ph.D.
>> R&D Engineer, Kitware Inc.
>> (518) 881-4932
>> jeff.baumes at kitware.com
>> 
> 
> 




More information about the vtk-developers mailing list