问题
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 8000does not work- I don't necessarily need v10.0 to work, but at least a DECENT version
SWT.MOZILLAandSWT.WEBKITare 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