0
我有一個存儲框管理頁面,應該用Java Web Start打開。但是,在我的MacBook上的所有瀏覽器上,這不會發生,而是我只是得到一個保存有內容的html頁面:「v6.3.1a Web Tools 10.1.18.222」。如何強制firefox打開使用java web start的頁面?
查看頁面的JavaScript代碼,我看到它正試圖是否安裝正確的Java Web Start的檢測:
function webstartVersionCheck(versionString) {
// Mozilla may not recognize new plugins without this refresh
navigator.plugins.refresh(true);
// First, determine if Web Start is available
if **(navigator.mimeTypes['application/x-java-jnlp-file'])** {
// Next, check for appropriate version family
for (var i = 0; i < navigator.mimeTypes.length; ++i) {
pluginType = navigator.mimeTypes[i].type;
if (pluginType == "application/x-java-applet;version=" + versionString) {
return true;
}
}
}
return false;
}
這是這裏稱爲:
function writeMozillaData(page) {
versionCheck = webstartVersionCheck("1.5");
if (!versionCheck) {
var pluginPage = "http://jdl.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=java.com";
document.write("The version of Java plugin needed to run the application is not installed. The page from where the plugin can be downloaded will be opened in a new window. If not, please click here: <a href=" + pluginPage + ">Download correct Java version.</a>");
window.open(pluginPage, "needdownload");
} else {
window.location = page;
}
}
我把mimeTypes中的警報,並注意到導航器中沒有顯示'application/x-java-jnlp-file'的mimeType。
問題:
- 這是什麼原因造成的瀏覽器解釋內容只是文本/ html和保存的HTML?
- 我該如何強制在這裏啓動Java Web Start?
我確實有firefox設置,表明jnlp可以通過Java Web Start應用程序處理,因此我懷疑瀏覽器並沒有將頁面解釋爲jnlp。