I've been using Watij very successfully for some time now, and have
many tests running under Windows XP and Vista. I have recently
installed Windows 7 and am having some problems with Watij, and
wondered if anyone could help me out.
I'm finding that some functionality it working (like simply opening an
IE instance at a designated URL), and some isn't, the main area I'm
having a problem with is using:
IEUtil.browserCount()
When I try to use this method I get the following exception:
com.jniwrapper.win32.com.ComException: COM object method returns error
code: 0x80040154; Class not registered
at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:72)
at com.jniwrapper.win32.com.ComFunctions.coCreateInstance(SourceFile:
149)
at com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:79)
at com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>
(SourceFile:53)
at com.jniwrapper.win32.shdocvw.impl.IShellWindowsImpl.<init>
(SourceFile:38)
at com.jniwrapper.win32.shdocvw.ShellWindows.create(SourceFile:30)
at watij.runtime.ie.IEUtil$3.create(IEUtil.java:137)
at watij.utilities.IUnknownBinder$1.run(IUnknownBinder.java:19)
at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run
(MessageLoopThread.java:569)
at com.jniwrapper.win32.MessageLoopThread$LoopThread.run
(MessageLoopThread.java:511)
I did spot another post on here from a similar exception on Windows
200o which stated to try:
regsvr32 shdocvw.dll
However, when I run this, I get the following error:
"The module "shdocvw.dll" was loaded but the entry-point
DllRegisterServer was not found. Make sure that "shdocvw.dll" is a
valid DLL or OCX file and then try again."
Obviously, trying this made no difference to the problem, can anyone
help me out here?
Thanks in advance,
Mike.
Does anyone have any insight on this to help me out?
Thanks,
Mike.
Thanks for this, however setting java.exe to Compatibility Mode for
Windows XP (SP 3) or Vista (SP 2) still gives the same problem, do you
have any other ideas? Do you think there are another files that need to
be run in compatibility mode for this to work?
Mike.
Alternatively, open up the task manager and go to the Processes tab.
From the View->Select Columns... menu option you can turn on the
'Command Line' column. Then you can see which JRE/JDK is being used to
run Watij.
Other than that, you have me stumped. My guess is that the
jniwrapper.dll is not compatible with Windows 7 and you'll need to get
a copy which is compatible.
Darrell
Thanks for the info once again. I have both java.exe and javaw.exe set
as running in compatibility mode for XP SP3 and no luck I'm afraid. I
have tried running from Eclipse and directly through a simple DOS script
running java.exe directly, and still no luck. I've also checked
c:\windows\system32 and there is no java.exe present at this location to
confound things, so it looks like its a no go with Windows 7 unless any
other thoughts come your way?
Thanks for your help anyway,
Mike.
Darrell
JNIWrapper 3.1 Release Notes (30-Jan-2006)
Added the ability to run JNIWrapper on 64-bit x86 platforms in 32-bit mode.
JNIWrapper 3.3 Release Notes (20-Jul-2006)
Added support for Windows 64-bit platform.
JNIWrapper 3.6.1 Release Notes (06-Apr-2007)
Added support for Solaris x86 and x86-64 platforms.
Nothing more on Windows capatibility since then. From this, it looks
like it should work fine in Windows 7, even though this last note is for
3.6.1, the previous notes state that compatibility shouldn't be the
problem here as long as we are running in compatibility mode only, would
you concur? Looks like 3.6.1 may improve things for full compatibility
with Windows 7, but should be fine in 32-bit compatibility mode.
Mike.
On Jan 8, 9:11 am, Mike Smith <mike.smi...@sky.com> wrote:
> Looking at the release notes from TeamDev, and quoting the parts
> relevant to this issue, the following is stated in their release notes:
>
> JNIWrapper 3.1 Release Notes (30-Jan-2006)
>
> Added the ability to run JNIWrapper on 64-bit x86 platforms in 32-bit mode.
>
> JNIWrapper 3.3 Release Notes (20-Jul-2006)
>
> Added support for Windows 64-bit platform.
>
> JNIWrapper 3.6.1 Release Notes (06-Apr-2007)
>
> Added support for Solaris x86 and x86-64 platforms.
>
> Nothing more on Windows capatibility since then. From this, it looks
> like it should work fine in Windows 7, even though this last note is for
> 3.6.1, the previous notes state that compatibility shouldn't be the
> problem here as long as we are running in compatibility mode only, would
> you concur? Looks like 3.6.1 may improve things for full compatibility
> with Windows 7, but should be fine in 32-bit compatibility mode.
>
> Mike.
>
>
>
> darrell wrote:
> > The only thing I could suggest is to confirm that the jniwrapper.dll
> > is not compatible with Windows 7. You can check athttp://www.teamdev.com
I've also tried Watij with a 64-bit JRE and this also doesn't work as
you get an error stating that jniwrap64.dll cannot be found. Is
there any chance of looking into a 64-bit compatible version of Watij
using this jniwrap64.dll?
Mike.
Darrell