[vtkusers] HELP!! vtk+java problem

Jarek Sacha galicjan at yahoo.com
Fri Sep 5 21:23:42 EDT 2003


xiaofeng qi wrote:

>Hi vtkUsers:
>  
>  I am a new vtkUser,now i use vtk + java to develop application.
>I meet some problems when i compile the vtk's examples code,when i
>compile the Cone.java ,everything is fine,but when i compile the 
>SimpleVTK.java ,i get this error message:
>        c:\vtk42\bin\vtk.jar(vtk/vtkPanel.java):7: class vtkPanel is
>        public, should be declared in a file named vtkPanel.java (sou
>        rce unavailable)
>         1 error
>	
>
>  I have check the path and classpath,i also copy vtkPanel.java and 
>vtkCanvas.java to the running  path,but these are useless.
>   
>  Anyone can help?
>
>  thanks!!
>  
>

There is no need to add vtkPanel.java or vtkCanvas.java, vtkPanel.class and vtkCanvas.class should be within the vtk.jar in subdirectory vtk. You may check it by opening vtk.jar with WinZip or similar program, or by
typing 
  jar tf c:\vtk42\bin\vtk.jar | more

The error you are reporting may happen when class name does not much a file  in which it is defined. Say you defines a class vtkPanel but saved it in file SomethingElse.java. 
Did you modify any of the example you are compiling?
Created new file from vtkPanel?

Jarek





More information about the vtkusers mailing list