<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I guess we come nearer to the solution
:-)<br>
First of all I looked here how to load libraries:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://www.vtk.org/Wiki/VTK/Java_Wrapping">http://www.vtk.org/Wiki/VTK/Java_Wrapping</a><br>
<br>
The snipped I added to my main was:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre class="de1" style="padding: 0px; border: 0px none white; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); line-height: 1.2em; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: monospace; margin: 0px; background-image: none; vertical-align: top; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><span class="kw1" style="color: rgb(0, 0, 0); font-weight: bold;">if</span> <span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="sy0" style="color: rgb(51, 153, 51);">!</span>vtkNativeLibrary.<span class="me1" style="color: rgb(0, 102, 51);">LoadAllNativeLibraries</span><span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="br0" style="color: rgb(0, 153, 0);">)</span><span class="br0" style="color: rgb(0, 153
, 0);">)<
/span> <span class="br0" style="color: rgb(0, 153, 0);">{</span>
<span class="kw1" style="color: rgb(0, 0, 0); font-weight: bold;">for</span> <span class="br0" style="color: rgb(0, 153, 0);">(</span>vtkNativeLibrary lib <span class="sy0" style="color: rgb(51, 153, 51);">:</span> vtkNativeLibrary.<span class="me1" style="color: rgb(0, 102, 51);">values</span><span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="br0" style="color: rgb(0, 153, 0);">)</span><span class="br0" style="color: rgb(0, 153, 0);">)</span> <span class="br0" style="color: rgb(0, 153, 0);">{</span>
<span class="kw1" style="color: rgb(0, 0, 0); font-weight: bold;">if</span> <span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="sy0" style="color: rgb(51, 153, 51);">!</span>lib.<span class="me1" style="color: rgb(0, 102, 51);">IsLoaded</span><span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="br0" style="color: rgb(0, 153, 0);">)</span><span class="br0" style="color: rgb(0, 153, 0);">)</span> <span class="br0" style="color: rgb(0, 153, 0);">{</span>
<span class="kw3" style="color: rgb(0, 51, 153);">System</span>.<span class="me1" style="color: rgb(0, 102, 51);">out</span>.<span class="me1" style="color: rgb(0, 102, 51);">println</span><span class="br0" style="color: rgb(0, 153, 0);">(</span>lib.<span class="me1" style="color: rgb(0, 102, 51);">GetLibraryName</span><span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="br0" style="color: rgb(0, 153, 0);">)</span> <span class="sy0" style="color: rgb(51, 153, 51);">+</span> <span class="st0" style="color: rgb(0, 0, 255);">" not loaded"</span><span class="br0" style="color: rgb(0, 153, 0);">)</span><span class="sy0" style="color: rgb(51, 153, 51);">;</span>
<span class="br0" style="color: rgb(0, 153, 0);">}</span>
<span class="br0" style="color: rgb(0, 153, 0);">}</span>
<span class="br0" style="color: rgb(0, 153, 0);">}</span>
vtkNativeLibrary.<span class="me1" style="color: rgb(0, 102, 51);">DisableOutputWindow</span><span class="br0" style="color: rgb(0, 153, 0);">(</span><span class="kw2" style="color: rgb(0, 0, 102); font-weight: bold;">null</span><span class="br0" style="color: rgb(0, 153, 0);">)</span><span class="sy0" style="color: rgb(51, 153, 51);">;</span></pre>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<br>
And then i got those printings on my console:<br>
<br>
vtkCommonJava not loaded<br>
vtkFilteringJava not loaded<br>
vtkGeovisJava not loaded<br>
vtkGraphicsJava not loaded<br>
vtkHybridJava not loaded<br>
vtkImagingJava not loaded<br>
vtkInfovisJava not loaded<br>
vtkIOJava not loaded<br>
vtkRenderingJava not loaded<br>
vtkViewsJava not loaded<br>
vtkVolumeRenderingJava not loaded<br>
vtkWidgetsJava not loaded<br>
vtkChartsJava not loaded<br>
<br>
So I know that the libraries are not loaded. This is a complete
step further, but what I now need to know is, how to load the
libraries.<br>
<br>
<br>
Am 19.02.2014 17:56, schrieb Sebastien Jourdain:<br>
</div>
<blockquote
cite="mid:CABObKxc210iGTEuFdqiVc8BsDwTEUMg36s+V_RH8ro28kGMkSQ@mail.gmail.com"
type="cite">
<div dir="ltr">Ok, so the first step works... If you provide half
of the facts we will provide only half of the fix. ;-)
<div><br>
</div>
<div>Which means, you are missing the load library call inside
your Java/Scala code...</div>
<div>Your environment is properly set, but now, you need to tell
the JVM to load those libraries. </div>
<div>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.</div>
<div><br>
</div>
<div>Seb</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Feb 19, 2014 at 9:47 AM, Robert
Häckl <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:robert_haeckl@fear-gfx.de" target="_blank">robert_haeckl@fear-gfx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>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:
<div class=""><br>
Exception in thread "main"
java.lang.UnsatisfiedLinkError: no vtkCommonJava in
java.library.path<br>
</div>
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: <a
moz-do-not-send="true"
href="https://github.com/chris1412/PlanetSim"
target="_blank">https://github.com/chris1412/PlanetSim</a>
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. <br>
<br>
Am 19.02.2014 17:23, schrieb Sebastien Jourdain:<br>
</div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">I'm making things up here, but it
should look like that on linux:
<div><br>
</div>
<div>export LD_LIBRARY_PATH=/path-to-vtk/lib</div>
<div>java -cp /path-to-vtk/lib/vtk.jar
your.main.class</div>
<div><br>
</div>
<div>Seb</div>
<div><br>
</div>
<div>PS: Please keep the list in the loop.</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Feb 19, 2014 at
9:15 AM, Robert Häckl <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:robert_haeckl@fear-gfx.de"
target="_blank">robert_haeckl@fear-gfx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Sebastian!<br>
<br>
I tried several path settings, but always
not to an *.so file.<br>
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?<br>
<br>
Thanks a lot<br>
<br>
Robert<br>
<br>
<br>
Am 19.02.2014 15:46, schrieb Sebastien
Jourdain:<br>
</div>
<div>
<div>
<blockquote type="cite">
<div dir="ltr">Hi Robert,
<div><br>
</div>
<div>Did you set the following
environment variable to contain
the path to the directory that
contains all the VTK libraries?</div>
<div><br>
</div>
<div>- Win (*.dll): PATH</div>
<div>- Linux (*.so): LD_LIBRARY_PATH</div>
<div>- Mac (*.dylib):
DYLD_LIBRARY_PATH</div>
<div><br>
</div>
<div>Seb</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Feb
19, 2014 at 4:17 AM, Robert Häckl
<span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:robert_haeckl@fear-gfx.de"
target="_blank">robert_haeckl@fear-gfx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF"
text="#000000"> 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:<br>
Exception in thread "main"
java.lang.UnsatisfiedLinkError:
no vtkCommonJava in
java.library.path<br>
<br>
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.<br>
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.<br>
<br>
Yours sincerely<span><font
color="#888888"><span><font
color="#888888"><br>
<br>
Robert</font></span> </font></span></div>
<br>
_______________________________________________<br>
Powered by <a
moz-do-not-send="true"
href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source
projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to
subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtk-developers"
target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>