关闭

Watij 在WINDOWS 7 能使用吗?

标签: windowsmozillajava64bitapiexception
3613人阅读 评论(0) 收藏 举报
Are you using the old api or the new WebSpec api?  WebSpec works fine on Win 7 X 64. 


Two solutions. Best solution, switch to WebSpec API as the old version 
of Watij (3.2.1) is being replaced with WebSpec. 

Alternative solution, run in 32-bit mode. I have not tried it but two 
thoughts come to mind. The first is that Java has a switch (-D32 I 
think) to make 64-bit Java run in 32 bit mode. This might trick Watij 
into using the 64-bit DLL. The other option is to create a shortcut 
and set it to run in 32-bit mode (might be called Compatibility mode). 
If you run things from the shortcut it should be totally 32 bit and 
work fine. From the command line you can use the RUNAS.EXE to set the 
mode. 



Watij (the old API) works fine on Win 7 64bit, too. Just make sure to 
use a 32bit java version. (Otherwise a 64bit jni dll is missing) 


Hi, 
    I'm facing same problem. I installed Watij (webspec_1.0.1_beta) 
today on Windows 7. Wrote following code 

@Test 
        public void testRun() 
        { 
        Spec spec = new Spec().safari(); 
        spec.open("http://www.google.com"); 
        spec.find("input").with("name=='q'").set("value='Watij'"); 
        spec.find("input").with("type=='button'").with("value=='Google 
Search'").click(); 
        //check results 
        spec.find("a").with("href=='http://watij.com/'").shouldExist(); 
        } 

but it throws exception of 

java.lang.ExceptionInInitializerError 
Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find 
JNIWrapper native library (jniwrap64.dll) 

I tried few things but no use. I'm not sure what's missing. 

Any direction is appreciated, 
Thanks, 
Anu 

On Sep 22, 11:35 pm, chribuhhh <chribu...@googlemail.com> wrote: 



   
Brian Knorr  
View profile  
 More options Nov 7 2010, 8:20 am
Yes for the WebSpec API on windows 64 you have to use 32 bit java sdk. 

The old Watij api works with IE on Windows.  Watij's new WebSpec api 
works with IE and Mozilla on Windows, Safari and Mozilla on Mac, and 
Mozilla on Linux.  For Windows 7 (64bit) make sure you are using a 
32bit Java SDK.  On Mac you just have to pass in -d32 in your VM args 
to force 32bit Java execution. 

On Nov 8, 1:13 pm, Anamika T 


I have used Watij with IE7 and IE8. No problems at all. It does not 
work on x64 systems however. 






0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:5880864次
    • 积分:57448
    • 等级:
    • 排名:第52名
    • 原创:329篇
    • 转载:1703篇
    • 译文:19篇
    • 评论:171条
    博客专栏
    网上乐园
    最新评论