[vtkusers] install java and vtk on windows ( almost there )
marcelo oliveira
oliveira_mc at yahoo.com.br
Sun Sep 15 23:20:26 EDT 2002
Hi Jarek
U are helping me a lot,
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
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)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:509)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at
java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
at
java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at
java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at
java.security.AccessController.doPrivileged(Native
Method)
at
java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
I try to find something like that in mail list but i
didn´t find.
ps. My new cmake is on attach
Tanks for advanced me
Marcelo
From: "Jarek Sacha" <galicjan at yahoo.com>
To: "Marcelo Costa Oliveira"
<marcelo at cci.fmrp.usp.br>; "VTK-List"
<vtkusers at public.kitware.com>
Sent: Friday, September 13, 2002 4:25 PM
Subject: Re: [vtkusers] install java and vtk on
Windows
> --- Marcelo Costa Oliveira <marcelo at cci.fmrp.usp.br>
wrote:
> > My steps was ( in Windows XP, java 1.4.0.02 and
vtk4.0 )
> >
> > Cmake ( in attach )
> >
> > build vtk.dsw ( with visual c++ 6.0 )
> >
> > c:\jdk\bin\javac *.java ( in vtk\java\ )
> >
> > c:\jdk\bin\jar cf vtk.jar *.class ( in vtk\java\ )
>
> This could be the problem. You should be issuing
this command in a
> directory one above where your vtk classes are
located. That is
> vtkConeSource.class and other VTK classes should be
in the subdirectory
> 'vtk' of the directory where you are issuing your
jar command. Your should
> be able to create jar using command
> c:\jdk\bin\jar cf vtk.jar vtk/*.class
>
> Use explorer or do this in the same directory where
your are issuing your
> jar command:
>
> dir vtk\vtkConeSource.class
>
> This is to see if vtkConeSource.class is in correct
place. If I understood
> your CMakeCache the vtkConeSource.class is in
C:\vtk\java\vtk\vtk\. Though
> it is a bit inconsistent with your errors messages,
see below.
>
>
> >
> > c:\jdk\bin\javac -classpath .;c:\vtk\java\vtk.jar
SimpleVTK.java
> >
> > The problem:
> >
> > SimpleVTK.java:5: package vtk does not exist
> > import vtk.*;
> > ^
> > SimpleVTK.java:19: cannot access vtkConeSource
> > bad class file:
c:\vtk\java\vtk\vtk.jar(vtkConeSource.class)
> > class file contains wrong class: vtk.vtkConeSource
> > Please remove or make sure it appears in the
correct subdirectory of the
> > classpa
> > th.
>
> There are two things that look suspicious. First,
error message indicates
> vtk.jar in c:\vtk\java\vtk\vtk.jar, the class path
passed to the compiler
> says c:\vtk\java\vtk.jar. Second, error message
seems to indicate that
> vtkConeSource.class in the root directory of vtk.jar
while it should be in
> subdirectory vtk within vtk.jar. You can check where
vtkConeSource.class
> is using WinZip or at command prompt type:
> jar cf c:\vtk\java\vtk.jar | more
> If vtk.jar is correct there should be line
> vtk/vtkConeSource.class
>
> Hope this helps,
>
> Jarek
_______________________________________________________________________
Yahoo! Encontros
O lugar certo para encontrar a sua alma gêmea.
http://br.encontros.yahoo.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeCache.txt
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020916/cb50dc8b/attachment.txt>
More information about the vtkusers
mailing list