[vtkusers] vtk installation CMake java problem

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri Nov 21 14:19:22 EST 2014


The PATH should point to the directory that contains the dll's, not the
dll's themselves.



On Fri, Nov 21, 2014 at 12:07 PM, James Labiak <
jim at jslengineeringsoftware.com> wrote:

>  Hi Seb,
> I followed your directions, and now Eclipse gives the error "Exception in
> thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in
> java.library.path". I have set the Path to include the dll library, but
> there is no dll called vtkCommonJava.
> Jim
>
>
>
> On 11/21/2014 10:45 AM, Sebastien Jourdain wrote:
>
> Hi Jim,
>
>  The red mean, "New option available base on your previous choice".
> For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would mean
> you want a static build with the Java wrapping. And to my knowledge, that
> is not possible with Java.
>
>  Otherwise, to have VTK works within the Eclipse development environment,
> I usually need 2 things:
> - Add the vtk.jar to the classpath of my project
> - (on Windows) expend the PATH env var to add the directory that contains
> all the dll of VTK. If you pick the option to package VTK for Java, then
> you will need to unzip the native JAR file and point to the content of its
> directory.
>
>  Seb
>
> On Fri, Nov 21, 2014 at 7:31 AM, James Labiak <
> jim at jslengineeringsoftware.com> wrote:
>
>>  Hi Seb,
>> The JOGL and SWT were red, so I thought that I needed them. I just want a
>> standard installation that I can use in Java with Eclipse, then be able to
>> distribute a program to another user. With them off, the installation
>> seemed to work but a sample java file cone.java showed java path errors in
>> Eclipse. I had set CLASSPATH sys var to
>> C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program
>> Files\VTK\natives-Windows-AMD64 in the PATH variable as well as
>> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it
>> sounds like I want an installation with BUILD_SHARED_LIBS off for my
>> distribution purpose. When I do that, I get tons of errors in VS 2013. Am
>> compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't
>> sure what to do with the binary distribution files.
>> Thanks,
>> Jim
>>
>>
>>
>> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote:
>>
>> Hi James,
>>
>>  Please keep the thread on the mailing list so other community members
>> could benefit from your question as well.
>>
>>  So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and
>> VTK_JAVA_SWT_COMPONENT?
>>
>>  Turning any of those option require that you have already the SWT
>> native library or the JOGL library installed on your system. On top of
>> that, none of them is required to have a VTK with Java Wrapping working.
>>
>>  In fact, you can probably just download the generated binaries from our
>> VTK dashboard if you don't want to build VTK yourself here:
>>
>>
>> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build
>>
>>  Then if you truly want to build VTK and have the JOGL rendering classes
>> available on top of the default ones, then the best approach is to get them
>> using Maven. And you should make sure you provide the path to the proper
>> jar inside your CMake config. (You may need to toggle the advance mode to
>> see them).
>>
>>  Seb
>>
>>>
>>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak <
>>> jim at jslengineeringsoftware.com> wrote:
>>>
>>>>  Hi Seb,
>>>> Thanks for picking up on this. I put images of the CMake process below,
>>>> also the JOGL source directory files and the JOGL build directory files.
>>>> Here are some errors that VS 2013 gives, which is how I noticed that the
>>>> JOGL classes were missing from the build directory structure. If I should
>>>> be placing JOGL jar files somewhere, then I'm not sure where to put
>>>> it(them).
>>>> Thanks,
>>>> Jim
>>>>
>>>> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in
>>>> conjunction with -source 1.5
>>>> 386>
>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3:
>>>> error: package javax.media.opengl does not exist
>>>> 386>  import javax.media.opengl.GLAutoDrawable;
>>>>
>>>> 386>
>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: error:
>>>> package javax.media.opengl.awt does not exist
>>>> 386>  import javax.media.opengl.awt.GLJPanel;
>>>>
>>>> 387>
>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error:
>>>> cannot find symbol
>>>> 387>      public vtkJoglCanvasComponent(vtkRenderWindow renderWindow,
>>>> GLCapabilities capabilities) {
>>>> 387>                                                                  ^
>>>> 387>    symbol:   class GLCapabilities
>>>> 387>    location: class vtkJoglCanvasComponent
>>>> 387>
>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: error:
>>>> package javax.media.opengl does not exist
>>>> 387>  import javax.media.opengl.GLCapabilities;
>>>>
>>>>
>>>>
>>>>
>>>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote:
>>>>
>>>> Hi James,
>>>>
>>>>  What do you mean by JOGL classes? Are you talking about the JOGL jar
>>>> files?
>>>>  What did you change in your CMake configuration step?
>>>>
>>>>  Seb
>>>>
>>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak <
>>>> jim at jslengineeringsoftware.com> wrote:
>>>>
>>>>>  Hello,
>>>>> I am trying to install vtk with Java wrapping. When I build in VS
>>>>> 2013, I get errors related to jogl classes not being found. I placed the
>>>>> missing classes java files in the vtk\rendering\jogl directories as
>>>>> necessary, but after CMake Configure and Generate steps, the jogl files are
>>>>> not being copied to the build directory Java\rendering\jogl directory and
>>>>> so I get the same errors upon build in VS 2013.
>>>>> Thanks,
>>>>>
>>>>
>>>>     _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>
>
> --
> James Labiak
> JSL Engineering and Software
> 6545 Lainhart Rd.
> Altamont, NY 12009
> Phone: 518-861-1113
> Mobile: 231-638-3725
> email: jim at jslengineeringsoftware.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141121/240656dc/attachment.html>


More information about the vtkusers mailing list