[vtkusers] Problems using VTK with Java in Windows XP
joe at fluiditymed.com
joe at fluiditymed.com
Mon Jan 10 18:37:47 EST 2011
Hi Benoît,
Thank you kindly for responding.
I took your suggestion and gave the 2010 Express edition a try. I was
getting the same problems with the UnsatisfiedLinkError as before.
Then I decided to give the latest version of Java a try (I had been using
1.6.0_05 until just recently.) Again I was running into the same
UnsatisfiedLinkError as before.
Then I installed the latest official release of NetBeans (6.9.1) and
imported the settings from my previous version of NetBeans (6.7). Again
the same issue.
So finally I removed all of my version of the Java JRE and JDK and
reinstalled the latest (1.6.0_23). Again I was getting the same issue.
Then I removed and reinstalled NetBeans and DIDN'T import the settings
from my previous version of NetBeans. Now my sample Cone application seems
to work. I can't say that loading a clean version of NetBeans 6.9.1
without importing previous settings did the trick, since I've been
changing so many variables in the past few days. However, it is possible
that there was something goofy with my NetBeans 6.7 settings that caused
the link error.
My next step is to create an external build (ant) file so that I can build
and run outside of NetBeans. Ultimately I would like to be able to create
VTK (and ITK) apps in Groovy.
Thanks much for your help.
Kind regards,
Joe
> Hi Joe,
>
> I have had some problems too with VTK compilation under Windows, but I
> never saw a dependency with Internet Explorer... what are the compilation
> option you used?
> I also remember having difficulties to compile with Visual Studio 2008 on
> XP. Maybe you should give a try to the 2010 Express edition.
>
> Also, be aware that when you execute VTK with another machine than the one
> you used to compile it, you have to add two extra dlls to your VTK dlls in
> order to avoid an UnsatisfiedLinkError:
> - jawt.dll
> - msvcrXX.dll, where XX depends on the version of Visual Studio you used
>
> The msvcr71.dll is integrated in the JRE6 (at least in the update 21).
> msvcr80.dll or msvcr90.dll are in the WinSXS repository depending on the
> Windows update level.
> jawt.dll can be found in the JRE6 package (tested with update 21), in the
> 'bin' directory. Three methods can be used to access this file:
> set your PATH to %PATH%;%JAVA_HOME%/bin JAVA_HOME being the path to
> your java installation (frequently C:Program Filesjavajre6 or jdk6)
> copy the jawt.dll in the vtk bin repository where VTK dlls are
> copy the jawt.dll in the c:/WINDOWS/System32 repository (avoid this
> system intrusive method...)
>
> HTH
>
> Benoît
>
>> From: <joe at fluiditymed.com>
>> Date: Mon, Jan 3, 2011 at 9:33 PM
>> Subject: Re: [vtkusers] Problems using VTK with Java in Windows XP
>> To: vtkusers at vtk.org
>>
>>
>> An update:
>>
>> I decided to install IE8 to see if the dependency issues would go away.
>> Some of the issues (e.g. the DWMAPI.DLL and SHLWAPI.DLL issues) did go
>> away. However, the MPR.DLL issue remains as well as two new missing
>> dependency issues (IESHIMS.DLL and WER.DLL). From the looks of things, I
>> can probably create dummy DLLs for IESHIMS.DLL and WER.DLL, but I still
>> have the MPR issue, which I cannot easily resolve, since I cannot just
>> replace the existing MPR.DLL with a dummy DLL.
>>
>> Has anyone out there come up with a way of running vtk apps in Java with
>> either the XP/IE7 or XP/IE8 combinations?
>>
>> Thanks much!
>>
>> Regards,
>> Joe
>>
>>> I am compiling on a Windows XP machine. I do not have access to a
>>> Windows
>>> Vista/7 machine for VTK development.
>>>
>>> The dependent-library problem that I am running into is caused by IE7
>>> running on a Windows XP machine. (My understanding is that this is not
>>> a
>>> problem when running IE7 on Vista/7.) Apparently VTK is calling
>>> routines
>>> in libraries which contain broken dependencies. Ordinarily, these don't
>>> appear to cause a problem in general use as these dependencies are
>>> delay-loading dependencies and an attempt to resolve them is put off
>>> until
>>> runtime. However, when calling System.loadLibrary("vtkRenderingJava"),
>>> it
>>> appears that a dependency check is made which uncovers the broken
>>> dependencies (and running Dependency Checker reveals the broken
>>> dependencies). Unfortunately, it appears that Java won't allow
>>> vtkRenderingJava to be loaded unless all of the broken dependencies are
>>> resolved, even if these dependencies are actually not called at
>>> runtime.
>>>
>>> I am running into three dependent-library issues related to the loading
>>> of
>>> vtkRenderingJava:
>>>
>>> 1. Missing DWMAPI.DLL. This module only exists on Windows Vista/7
>>> machines. Simply copying this DLL to Windows XP does not solve the
>>> problem
>>> as this would require copying more than just DWMAPI.DLL (since
>>> DWMAPI.DLL
>>> itself has dependencies which do not exist on a standard Win XP
>>> installation). I have solved this problem by creating a dummy
>>> DWMAPI.DLL
>>> library containing the DwmExtendFrameIntoClientArea() method.
>>>
>>> 2. SHLWAPI.DLL missing function #467 (called from IEFRAME.DLL).
>>>
>>> 3. MPR.DLL missing WNetRestoreConnectionA().
>>>
>>> I cannot resolve 2. and 3. through the use of dummy DLLs. In any case,
>>> I
>>> shouldn't have to generate dummy DLLs in order to get vtkRenderingJava
>>> loaded. Uninstalling IE7 is also not an option, either.
>>>
>>> Has anyone come across a similar situation and if so, how did you get
>>> around it? Is there some way of circumventing the checking for
>>> dependencies in System.loadLibrary() that I don't know about? I cannot
>>> imagine that I am the only vtk user who has ever run into such a
>>> problem.
>>>
>>> Once again, thanks for any help which can be provided.
>>>
>>> Kind regards,
>>> Joe
>>>
>>>
>>>> I guess you should do your compilation on Win XP and not windows 7.
>>>> Or try to put the dll from Win7 in your path on XP.`
>>>>
>>>> Seb
>>>>
>>>> On Sat, Jan 1, 2011 at 3:48 PM, <joe at fluiditymed.com> wrote:
>>>>> Hello,
>>>>>
>>>>> I am trying to get VTK with Java binding to work on a Windows XP
>>>>> machine.
>>>>> I have generated a build using Visual Studio 2008 Express Edition.
>>>>> When
>>>>> I
>>>>> try to run the Cone application, I am getting the following:
>>>>>
>>>>> java.lang.UnsatisfiedLinkError:
>>>>> C:\VTK-Build\bin\Release\vtkRenderingJava.dll: Can't find dependent
>>>>> libraries
>>>>> 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:823)
>>>>> at java.lang.System.loadLibrary(System.java:1030)
>>>>> at cone.Main.<clinit>(Main.java:36)
>>>>> Exception in thread "main" Java Result: 1
>>>>>
>>>>> Using Dependency Checker, I have managed to trace this to a missing
>>>>> DWMAPI.DLL file from vtkRenderingJava.dll. The problem is that
>>>>> DWMAPI.DLL
>>>>> is a Vista/Win 7 file and does not exist in Windows XP.
>>>>>
>>>>> Is there a way of getting around this problem?
>>>>>
>>>>> Thanks for any help that you can provide.
>>>>>
>>>>> Kind regards,
>>>>> Joe
>>>>>
>>>>> _______________________________________________
>>>>> 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://www.vtk.org/mailman/listinfo/vtkusers
>>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>> _______________________________________________
>> 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://www.vtk.org/mailman/listinfo/vtkusers
>>
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list