[vtkusers] install java and vtk on windows ( almost there )

Jarek Sacha galicjan at yahoo.com
Mon Sep 16 21:14:44 EDT 2002


At 11:20 PM 9/15/2002, marcelo oliveira wrote:
>I think that we almost there...
>
>Now, this error appear when i try to compile
>simplevtk.java ( vtkpanel.class
>is on vtk.jar )
>
>
>C:\vtk1\Wrapping>javac -classpath
>.;c:\vtk1\java\vtk.jar;c:\vtk1\bin\debug\
>simplevtk.java
>
>simplevtk.java:6: package vtkPanel does not exist
>import vtkPanel.*;
>^
>simplevtk.java:18: cannot access vtk.vtkPanel
>bad class file:
>c:\vtk1\java\vtk.jar(vtk/vtkPanel.class)
>class file contains wrong class: vtkPanel
>Please remove or make sure it appears in the correct
>subdirectory of the
>classpa
>th.
>         vtkPanel renWin = new vtkPanel();
>         ^
>2 errors

As the error message indicates. You have vtkPanel.class in the wrong place 
in the vtk.jar. vtkPanel should be in the root of the vtk.jar file, seems 
that you have it inside subdirectory vtk. (yes, it is a bit confusing, 
vtkPanel is in 4.0 treated different then most other VTK Java classes).



>and when i try to compile cone.java:
>
>
>
>C:\vtk1\Wrapping>javac -classpath
>.;c:\jdk\lib\vtk.jar;c:\vtk1\bin\debug\
>cone.java    ( IS OK !!!!)
>
>
>but:
>
>C:\vtk1\Wrapping>java -classpath
>.;c:\jdk\lib\vtk.jar;c:\vtk1\bin\debug\
>cone
>Exception in thread "main"
>java.lang.NoClassDefFoundError: cone (wrong name:
>Con
>e)
>         at java.lang.ClassLoader.defineClass0(Native
>Method)
>...

I am not sure what cone.java is, but you may have with lack of case 
sensitivity in Windows file name handling. Unlike Windows, Java can see 
difference between small and capital letters in file names. Probably inside 
cone.java you have class Cone. You may need to rename cone.java to 
Cone.java to avoid confusion.

Hope this helps,

Jarek





More information about the vtkusers mailing list