Fw: [vtkusers] Problems Installing vtk 4.2 with Java -- Please Help!

Sattiraju V Prabhakar sprabhakar at sbcglobal.net
Sat Apr 3 18:05:29 EST 2004


Hi Shyam, in addition to giving the commands at msdos console,
I tried to use a Java IDE to execute Cone.java. I added all the dlls from
the
vtk42\bin directory, the .lib files in vtk42\lib\vtk and jawt.dll to the
libraries.
I used Intellij Idea 4.0. I get the same following error message.

I get an error pane with title "Java Virtual Machine Launcher" and message:
"Could not find the main class - program will exit".

On the console, I get the following errors:
java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
 at java.lang.Runtime.loadLibrary0(Runtime.java:788)
 at java.lang.System.loadLibrary(System.java:834)
 at Cone.<clinit>(Cone.java:17)

Thanks!
Prabhakar


----- Original Message ----- 
From: "Sattiraju V Prabhakar" <sprabhakar at sbcglobal.net>
To: "R K Shyam Prakash" <ramakrishna.prakash at quest-global.com>
Cc: "Sattiraju V Prabhakar" <sprabhakar at sbcglobal.net>
Sent: Saturday, April 03, 2004 1:06 AM
Subject: Re: [vtkusers] Problems Installing vtk 4.2 with Java -- Please
Help!


> Hi Shyam,
>
> I tried a number of things to see whether java is able to run the
> Cone.class. I get the same error. I added the jawt.dll file to vtk42\bin
> directory. It is giving the same error. I shall really appreciate any
help.
>
> Prabhakar
>
>
>
>
C:\PRABHAKAR\Programs\Resources\Graphics_Visualization\vtk42\Examples\Tutori
> al\S
> tep1\Java>java -classpath
> .;C:\Prabhakar\Programs\Resources\Graphics_Visualizati
> on\vtk42\bin\vtk.jar Cone
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
vtkCommonJava
> in j
> ava.library.path
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
>         at java.lang.System.loadLibrary(System.java:834)
>         at Cone.<clinit>(Cone.java:17)
>
>
C:\PRABHAKAR\Programs\Resources\Graphics_Visualization\vtk42\Examples\Tutori
> al\S
> tep1\Java>java -classpath
> .;C:\Prabhakar\Programs\Resources\Graphics_Visualizati
>
on\vtk42\bin\vtk.jar;C:\Prabhakar\Programs\Resources\Graphics_Visualization\
> vtk4
> 2\lib Cone
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
vtkCommonJava
> in j
> ava.library.path
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
>         at java.lang.System.loadLibrary(System.java:834)
>         at Cone.<clinit>(Cone.java:17)
>
>
C:\PRABHAKAR\Programs\Resources\Graphics_Visualization\vtk42\Examples\Tutori
> al\S
> tep1\Java>java -classpath
> .;C:\Prabhakar\Programs\Resources\Graphics_Visualizati
>
on\vtk42\bin\vtk.jar;C:\Prabhakar\Programs\Resources\Graphics_Visualization\
> vtk4
> 2\lib\jawt.lib Cone
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
vtkCommonJava
> in j
> ava.library.path
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
>         at java.lang.System.loadLibrary(System.java:834)
>         at Cone.<clinit>(Cone.java:17)
>
>
C:\PRABHAKAR\Programs\Resources\Graphics_Visualization\vtk42\Examples\Tutori
> al\S
> tep1\Java>java -classpath
> .;C:\Prabhakar\Programs\Resources\Graphics_Visualizati
>
on\vtk42\bin\vtk.jar;C:\Prabhakar\Programs\Resources\Graphics_Visualization\
> vtk4
> 2\lib\vtk Cone
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
vtkCommonJava
> in j
> ava.library.path
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
>         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
>         at java.lang.System.loadLibrary(System.java:834)
>         at Cone.<clinit>(Cone.java:17)
>
>
>
>
> ----- Original Message ----- 
> From: "R K Shyam Prakash" <ramakrishna.prakash at quest-global.com>
> To: "'sprabhakar'" <sprabhakar at sbcglobal.net>
> Sent: Wednesday, March 31, 2004 11:11 PM
> Subject: RE: [vtkusers] Problems Installing vtk 4.2 with Java -- Please
> Help!
>
>
> > Prabhakar,
> > Can you send me the complete stack of java error
> > messages?
> >
> > --Shyam
> >
> > > -----Original Message-----
> > > From: sprabhakar [mailto:sprabhakar at sbcglobal.net]
> > > Sent: Thursday, April 01, 2004 10:32 AM
> > > To: R K Shyam Prakash; vtkusers at vtk.org
> > > Cc: Sattiraju V Prabhakar
> > > Subject: Re: [vtkusers] Problems Installing vtk 4.2 with Java
> > > -- Please Help!
> > >
> > >
> > > Thanks Shyam for the prompt reply.
> > > I tried it and still it is giving me the same error.
> > >
> > > My build from source files has not created the vtk.jar file.
> > >
> > > But my binary installation has created a vtk.jar file.
> > > I used it to try what you suggested. It is giving me the
> > > same error.
> > >
> > > Can you suggest me what I can do to make either of the
> > > installations to work.
> > >
> > > Thanks!
> > > Prabhakar
> > >
> > > ----- Original Message ----- 
> > > From: "R K Shyam Prakash" <ramakrishna.prakash at quest-global.com>
> > > To: "'sprabhakar'" <sprabhakar at sbcglobal.net>; <vtkusers at vtk.org>
> > > Sent: Wednesday, March 31, 2004 10:24 PM
> > > Subject: RE: [vtkusers] Problems Installing vtk 4.2 with Java
> > > -- Please Help!
> > >
> > >
> > > > Prabhakar,
> > > > For me it doesn't seem to be a vtk problem. All you
> > > > should do is
> > > >
> > > > java -classpath .;c:\vtk\vtk.jar Cone   (I am assuming vtk.jar is at
> > > > c:\vtk. You can replace it with the actual path)
> > > >
> > > > and you should have the program up and running.
> > > >
> > > > --Shyam
> > > >
> > > > > -----Original Message-----
> > > > > From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On
> > > > > Behalf Of sprabhakar
> > > > > Sent: Wednesday, March 31, 2004 11:25 PM
> > > > > To: vtkusers at vtk.org
> > > > > Cc: Sattiraju V Prabhakar
> > > > > Subject: [vtkusers] Problems Installing vtk 4.2 with Java --
> > > > > Please Help!
> > > > >
> > > > >
> > > > > Hello,
> > > > >
> > > > > I have been trying to install vtk 4.2 with Java by
> > > building source
> > > > > code release. When I try executing Cone example, I get
> > > the following
> > > > > error.
> > > > >
> > > > > Exception in thread "main" java.lang.NoClassDefFoundError: Cone
> > > > >
> > > > > Here are the steps I followed, in detail.
> > > > >
> > > > > Computer Configuration:
> > > > >
> > > > > I am installing vtk4.2 on Windows 2000 Professional. I
> > > already have
> > > > > Visual Studio .Net and j2sdk1.4.2_02 installed. I installed CMake
> > > > > 1.8.3.
> > > > >
> > > > > Detailed Steps:
> > > > >
> > > > > 1. I copied subdirectories and files of vtk-src-windows
> > > directory on
> > > > > CD-ROM onto a local directory using "xcopy".
> > > > >
> > > > > 2. Then I ran CMake with the following settings:
> > > > >     BUILD-SHARED-LIBS    yes
> > > > >    VTK_WRAP_JAVA      yes
> > > > >
> > > > > Then I wrote out the build files using "ok" button.
> > > > > (I indicated a new folder for binary files)
> > > > >
> > > > > 3. My Visual Studio .Net automatically detected the new VTK.dsw
> > > > > project file. I selected "debug" for Active Configuration and
> > > > > applied ALL_BUILD. (Later I tried with Active Configuration -->
> > > > > Release with the same consequences). Now I have a Debug
> > > folder added
> > > > > to CMake folder in my binaries directory.
> > > > >
> > > > > 4. I set up my environment "path" variable to point to Debug.
> > > > >
> > > > > 5. I compiled Cone.java using javac and then tried to execute it
> > > > > using "java Cone". This gave the error mentioned above.
> > > > >
> > > > > 6. Then I copied all the files in Debug and pasted them in
> > > > > Winnt/System directory. I recompiled and executed Cone.java, with
> > > > > the same consequences.
> > > > >
> > > > > I appreciate any help on this.
> > > > >
> > > > > Prabhakar
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > This is the private VTK discussion list.
> > > > > Please keep messages on-topic. Check the FAQ at:
> > > > <http://public.kitware.com/cgi-bin/vtkfaq>
> > > > Follow this link to subscribe/unsubscribe:
> > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > >
> > >
>





More information about the vtkusers mailing list