SWT Browser navigator version

邮差的信 提交于 2020-01-25 00:34:09

问题


Even if my Windows has the latest version of IE, the SWT Browser still runs on version 5.0 (yes, FIVE). At least that's what a simple alert(navigator.appVersion) says so.

  • System.setProperty("org.eclipse.swt.browser.IEVersion", "8000"); does not work
  • -Dorg.eclipse.swt.browser.IEVersion 8000 does not work
  • I don't necessarily need v10.0 to work, but at least a DECENT version
  • SWT.MOZILLA and SWT.WEBKIT are out of the question. XULRunner gives headaches

SWT v3.8.1

Edit:

Actually, now that I think about it...

5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0; MDDRJS)
//                    ^ is this the browser version? Because the HTML and CSS
//                      functionalities beg to differ.

回答1:


change this registry entry "java.exe" under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION to "8000"




回答2:


Since Java 8 is around the corner, and the SWT Browser is a pain in the ... elbow, I do recommend JavaFX to anyone that reads this.

The JavaFX WebEngine is delightful, and you can embed it in a SWT Composite using the FXCanvas class from JavaFX.

If you're still using JavaFX 2.2, beware of some sneaky bugs.

Cheers.



来源:https://stackoverflow.com/questions/19005101/swt-browser-navigator-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!