[vtk-developers] Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Feb 19 11:56:27 EST 2014


Ok, so the first step works... If you provide half of the facts we will
provide only half of the fix. ;-)

Which means, you are missing the load library call inside your Java/Scala
code...
Your environment is properly set, but now, you need to tell the JVM to load
those libraries.
The VTK examples do have that piece of code and I guess, that you did not
call it before using a VTK class inside your Java/Scala environment.

Seb




On Wed, Feb 19, 2014 at 9:47 AM, Robert Häckl <robert_haeckl at fear-gfx.de>wrote:

>  I exactly tried this commands and they did not work for me. Only when
> I'm using the second command with java -cp /path-to-vtk/lib/vtk.jar
> your.main.class I can for example start a vtk demo. But when I try my scala
> project, i got the error again:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> vtkCommonJava in java.library.path
> I have set the LD_LIBRARY_PATH in my Development Environment, too. I'm
> using Intellij IDEA. Maybe it would be interesting, that my project is a
> maven project with using scala. I checked out this maven project:
> https://github.com/chris1412/PlanetSim and this should work out of the
> box because vtk is already installed as a maven dependency. I don't get it,
> how to fix my problem because I have tried several solutions.
>
> Am 19.02.2014 17:23, schrieb Sebastien Jourdain:
>
> I'm making things up here, but it should look like that on linux:
>
>  export LD_LIBRARY_PATH=/path-to-vtk/lib
> java -cp /path-to-vtk/lib/vtk.jar your.main.class
>
>  Seb
>
>  PS: Please keep the list in the loop.
>
>
> On Wed, Feb 19, 2014 at 9:15 AM, Robert Häckl <robert_haeckl at fear-gfx.de>wrote:
>
>>  Hi Sebastian!
>>
>> I tried several path settings, but always not to an *.so file.
>> Would you please show me a example where I could find the *.so file which
>> I need and how the command looks like which I have to do?
>>
>> Thanks a lot
>>
>> Robert
>>
>>
>> Am 19.02.2014 15:46, schrieb Sebastien Jourdain:
>>
>> Hi Robert,
>>
>>  Did you set the following environment variable to contain the path to
>> the directory that contains all the VTK libraries?
>>
>>  - Win (*.dll): PATH
>> - Linux (*.so): LD_LIBRARY_PATH
>> - Mac (*.dylib): DYLD_LIBRARY_PATH
>>
>>  Seb
>>
>>
>> On Wed, Feb 19, 2014 at 4:17 AM, Robert Häckl <robert_haeckl at fear-gfx.de>wrote:
>>
>>>  I'm a computer science student and at the moment I do the
>>> implementation of my master thesis. The topic is about to simulate
>>> particles and optimizing agents. But with using vtk, i ran in some
>>> troubles. I always get this error:
>>> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
>>> vtkCommonJava in java.library.path
>>>
>>> I already asked lots of google sites and no solution worked for me. I
>>> tried it a working project with vtk on another machine where it worked just
>>> fine. So you are my last hope.
>>> I'm using Ubuntu 13.10 and on the other machine Windows 7. On both I got
>>> the same error. Furthermore I use the Intellij IDEA and open-jdk 7 for
>>> linux.
>>>
>>> Yours sincerely
>>>
>>> Robert
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140219/0faa39e7/attachment-0002.html>


More information about the vtk-developers mailing list