简体   繁体   English

Windows 8 64位版本的浏览器类型SWT.MOZILLA出现问题

[英]Trouble with Browser type SWT.MOZILLA on windows 8 64 bit

after spending a day reading here and there I decided to ask help as I could not find a solution to my problem. 在这里和那里读了一天之后,我决定寻求帮助,因为我找不到解决问题的方法。

I have to create a java/swt application embedding a browser with full HTML5 support. 我必须创建一个Java / swt应用程序,该应用程序嵌入具有完全HTML5支持的浏览器。 That works out of the box on both linux and osx with SWT.NONE browser type (using webkit). 在具有SWT.NONE浏览器类型(使用webkit)的linux和osx上,这都是开箱即用的。 Unfortunatelly I have lot of troubles on windows. 不幸的是,我在窗户上有很多麻烦。

First let me say that I'm using SWT 4.2.x on windows 8 64 bit. 首先让我说我在Windows 8 64位上使用SWT4.2.x。

To make SWT browser work with webkit I had to install 32bit JVM and manually point to it (as the -d32 switch on default 64bit JVM says that no 32 bit JVM is installed). 为了使SWT浏览器与webkit一起使用,我必须安装32位JVM并手动指向它(因为默认64位JVM上的-d32开关表示未安装32位JVM)。 ALso installed Safari. 还安装了Safari。 And also I had to use 32bit SWT library. 而且我还必须使用32位SWT库。 WHen finally I got it run I discovered that Safari for windows does not support drag and drop as experienced and stated here: 当我最终使它运行时,我发现针对Windows的Safari不支持拖放操作,具体说明如下:

http://www.w3schools.com/html/html5_draganddrop.asp http://www.w3schools.com/html/html5_draganddrop.asp

So I decided to switch to mozilla. 所以我决定改用mozilla。 According to Eclipse/SWT documentation I have downloaded and installed XULRunner 1.8.0.1. 根据Eclipse / SWT文档,我已经下载并安装了XULRunner 1.8.0.1。 I have unzipped it into C:\\Program Files (x86)\\Mozilla\\XULRunner\\1.8.0.1\\xulrunner and run xulrunner --register-user (and also --register-global) 我已将其解压缩到C:\\ Program Files(x86)\\ Mozilla \\ XULRunner \\ 1.8.0.1 \\ xulrunner并运行xulrunner --register-user(以及--register-global)

Finally in my code I added 最后,在我的代码中,我添加了

System.setProperty("org.eclipse.swt.browser.DefaultType", "mozilla");

I have also set a global environment variable "MOZILLA_FIVE_HOME" pointing to the same XULRunner installation dir. 我还设置了指向相同XULRunner安装目录的全局环境变量“ MOZILLA_FIVE_HOME”。

But then, when I run my java program (32bit JRE, 32bit SWT) I get 但是然后,当我运行Java程序(32位JRE,32位SWT)时,我得到了

Exception in thread "main" org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME may not point at an embeddable GRE]

How can I fix that? 我该如何解决? Thanks in advance! 提前致谢!

EDIT: I was running command prompt not as administrator and xulrunner was not registering. 编辑:我不是以管理员身份运行命令提示符,并且xulrunner没有注册。 Doing as administrator, worked. 做管理员,工作。 However I'm still in trouble: XULRunner 1.9.x seems not to support HTML5. 但是我仍然有麻烦:XULRunner 1.9.x似乎不支持HTML5。 For example element.children is not supported. 例如,不支持element.children。 I managed installing XULRunner 10.0.2 that seems to have the required support. 我设法安装了似乎具有所需支持的XULRunner 10.0.2。 However as soon as I click into my embedded browser, the application just crashes without printing any error on java output console... 但是,一旦我单击嵌入式浏览器,该应用程序就会崩溃,而不会在java输出控制台上打印任何错误...

I need to find a solution in order to use either ecent version of mozilla or recent version of webkit on windows 我需要找到一种解决方案,以便在Windows上使用Mozilla的最新版本或Webkit的最新版本

Ok, loading XURLRunner 10.0.2 works. 好的,加载XURLRunner 10.0.2可以正常工作。 The crashing app was due to a stack overflow error in my js code. 崩溃的应用是由于我的js代码中的堆栈溢出错误。

I too am trying to embed XULRunner into my eclipse plug-in, with no luck (currently). 我也试图将XULRunner嵌入我的eclipse插件中,但目前还没有运气。 I came across your answer here. 我在这里遇到了你的答案。 Just wanted to comment that it is not reasonable that you executed 只是想评论说,您执行死是不合理的

xulrunner --register-user

nor 也不

xulrunner --register-global

on the XULRunner 10.X since according to this post https://stackoverflow.com/a/7567781/1743693 the support on installing the XULRunner system-wide was removed (which was a good step IMHO) 在XULRunner 10.X上运行,因为根据此帖子https://stackoverflow.com/a/7567781/1743693 ,已删除了在整个系统上安装XULRunner的支持(这是一个很好的步骤,恕我直言)

Trying to execute the aforementioned commands will result 尝试执行上述命令将导致

"Error: couldn't parse application.ini" “错误:无法解析application.ini”

As for my problem: I keep running into the runtime error: 至于我的问题:我一直遇到运行时错误:

Can't load library: C:\\Users\\david\\.swt\\lib\\win32\\x86_64\\swt-xulrunner-win32-4236.dll C:\\Users\\david\\.swt\\lib\\win32\\x86_64\\swt-xulrunner-win32.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform 无法加载库:C:\\ Users \\ david \\ .swt \\ lib \\ win32 \\ x86_64 \\ swt-xulrunner-win32-4236.dll C:\\ Users \\ david \\ .swt \\ lib \\ win32 \\ x86_64 \\ swt-xulrunner -win32.dll:无法在AMD 64位平台上加载IA 32位.dll

And I can't figure out where this is coming from. 我不知道这是哪里来的。

I'm running a VirtualBox with Windows 8 64bit 我正在使用Windows 8 64bit运行VirtualBox

If you can elaborate more on what solved your issue with that - i would really appreciate that. 如果您能详细说明解决该问题的方法,我将不胜感激。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM