[vtkusers] Vtk+java+linux installation problem
Lifang Liu
llifang at hotmail.com
Fri Sep 9 02:08:04 EDT 2005
Dear Mathieu,
Thanks for your advice. I have been log on root, so it should have
right to access the files. The test was run under /usr/local/lib/VTK-build,
I tried to run cone.java (using eclipse). It looks that the wrapper library
could not be loaded normally. Below is the error information:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/local/lib/VTK-build/bin/libvtkCommonJava.so.4.5.0: libvtkCommon.so.4.5:
cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at Cone.<clinit>(Cone.java:17)
Clearly libvtkCommon.so.4.5 is generated and located under
/usr/local/lib/VTK-build/bin
[root at MILLENIUMFALCON bin]# ls -al
total 45112
drwxr-xr-x 2 root root 4096 Sep 8 22:12 .
drwxr-xr-x 21 root root 4096 Sep 8 22:14 ..
-rwxr-xr-x 1 root root 381163 Sep 8 22:08 CommonCxxTests
-rwxr-xr-x 1 root root 24683 Sep 8 22:09 FilteringCxxTests
-rwxr-xr-x 1 root root 315352 Sep 8 22:11 GenericFilteringCxxTests
-rwxr-xr-x 1 root root 173317 Sep 8 22:10 GraphicsCxxTests
-rwxr-xr-x 1 root root 16785 Sep 8 22:11 ImagingCxxTests
-rwxr-xr-x 1 root root 26886 Sep 8 22:11 IOCxxTests
lrwxrwxrwx 1 root root 23 Sep 8 21:09 libvtkCommonJava.so ->
libvtkCommonJava.so.4.5
lrwxrwxrwx 1 root root 25 Sep 8 21:09 libvtkCommonJava.so.4.5
-> libvtkCommonJava.so.4.5.0
-rwxrwxrwx 1 root root 796163 Sep 8 21:09 libvtkCommonJava.so.4.5.0
lrwxrwxrwx 1 root root 19 Sep 8 21:07 libvtkCommon.so ->
libvtkCommon.so.4.5
lrwxrwxrwx 1 root root 21 Sep 8 21:07 libvtkCommon.so.4.5 ->
libvtkCommon.so.4.5.0
-rwxrwxrwx 1 root root 2470337 Sep 8 21:07 libvtkCommon.so.4.5.0
lrwxrwxrwx 1 root root 24 Sep 8 21:01 libvtkDICOMParser.so ->
libvtkDICOMParser.so.4.5
..........................
Any hint or advice would be highly appreciated!
Regards,
Lifang
>From: Mathieu Malaterre <mathieu.malaterre at kitware.com>
>To: Lifang Liu <llifang at hotmail.com>
>CC: vtkusers at vtk.org
>Subject: Re: [vtkusers] Vtk+java+linux installation problem
>Date: Wed, 07 Sep 2005 17:55:37 -0400
>
>Lifang Liu wrote:
>>Dear Mathieu,
>> Thank you so much. You are great. I only deleted lib and didn't
>>remove *.o files. It passed the first test with the rebuilding library. I
>>checked the testing result, but it still can't load the library
>>"vtkcommonjava" ......... In the old version of Regression.java
>>system.loadlibray("vtkCommonjava")... was used to load vtk library. It
>>used more general method to load the library. How can I use vtk library
>>in my own program? I only need to do something using VTK library.
>
>I am not sure I understand your question. Did you had a look at the
>examples in VTK:
>
>VTK/Examples/Tutorial/Step?/Java/*.java
>or some simple app like:
>VTK/Wrapping/Java/SimpleVTK.java
>
>
>> 1/51 Test: JavaRegression
>>Command: "/usr/local/jdk1.5.0_04/bin/java" "-classpath"
>>"/usr/local/lib/VTK-build/bin/vtk.jar:/usr/local/lib/VTK-build/Wrapping/Java"
>>"Regression" "-D" "VTK_DATA_ROOT-NOTFOUND" "-V"
>>"Baseline/Graphics/Cone.png"
>
>If you want to run the test, you should really download the VTKData,
>although I guess we should not be running this test if VTKData was not
>found. I believe this is fixed in CVS anyway.
>
>>Length of array: 270000
>>ERROR: In /usr/local/lib/VTK/IO/vtkPNGWriter.cxx, line 220
>>vtkPNGWriter (0x8092400): Unable to open file
>>../../../Testing/Temporary/Cone.png
>>
>>ERROR: In /usr/local/lib/VTK/IO/vtkImageWriter.cxx, line 506
>>vtkPNGWriter (0x8092400): Ran out of disk space; deleting file(s) already
>>written
>
>You installed VTK in /usr/local so you don't have write access -IMHO-. The
>message might be a little be more criptic but I believe this is what is
>happening ;-)
>Try running the test directly from the build tree (or where you have write
>access).
>
>Mathieu
_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
More information about the vtkusers
mailing list