简体   繁体   English

为什么此Java小程序崩溃并关闭IE6?

[英]Why does this Java applet crash and close IE6?

I am using the following Java Applet to get the full file path of a file that is to be uploaded: SVN LittleShoot . 我正在使用以下Java Applet来获取要上载的文件的完整文件路径: SVN LittleShoot

The thing is, the applet is initialized and it seems to be running in IE6 - but when I call one of the functions from JavaScript to the applet to open the file dialog box the browser crashes and closes itself just the dialog because shows up. 事实是,小程序已初始化,并且似乎正在IE6中运行-但是,当我从JavaScript调用小程序中的一个功能来打开文件对话框时,浏览器崩溃并仅关闭对话框,因为显示了该对话框。

Why is the case? 为什么会这样呢? How can I debug this, I don't have any log files to look at? 没有任何日志文件可以查看,该如何调试? What may be the cause - I am willing to take wild guesses here as I am desperate! 可能是什么原因-我绝望在这里愿意大胆猜测!

HTML Usage (removed JS): HTML用法(已删除JS):

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" id="LittleShootApplet" name="LittleShootApplet" width="0" height="0">  
<PARAM name="code" value="LittleShootApplet" />
<PARAM name="scriptable" value="true" />
<PARAM name="mayscript" value="true" />
<PARAM name="style" value="xdisplay: none; width:0; height:0; padding:0; margin:0;" />
</OBJECT>

Update 更新资料

I get this error now: "Object doesn't support this property or method." 我现在收到此错误:“对象不支持此属性或方法。” I think its talking about this line. 我认为这是关于这条线的。

<input type="button" value="Browse.." onclick="document.LittleShootApplet.openDialog('onFileDialogFile', 'onFileDialogCancel');">

Using just the HTML version, I get a JS error! 仅使用HTML版本,就会出现JS错误!

What happens if you put in some test calls from within the Applet itself: to make the same call that the JS calls hook into ? 如果从Applet本身进行一些测试调用会发生什么:进行与JS调用相同的调用? Does this also crash ? 这还会崩溃吗?

If it doesn't crash, then I would say you have found a bug in the browser itself (or 'LiveConnect' - whatever the kids are calling Java<->JS communication these days..) 如果它没有崩溃,那我想说的是您已经在浏览器本身中发现了一个错误(或“ LiveConnect”-不管孩子们如今如何称呼Java <-> JS通信。)

If that it is the case, I would suggest the following: 如果是这样,我建议如下:

  1. Simplify the Applet, so that it contains the minimum amount of code in order that it crashes: same goes for the JSScript. 简化Applet,使其包含最少数量的代码,以使其崩溃:JSScript也是如此。

  2. Get it to crash - then your stuck with debugging a Windows program I think: 使其崩溃-然后您陷入调试Windows程序的困境,我认为:

http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx

Open the Java Console and load the applet. 打开Java控制台并加载小程序。 Go to the Control Panel > Java > advanced and enable debugging and the console 转到控制面板> Java>高级并启用调试和控制台

You seem to say that just opening up the Java Console causes a crash as well ? 您似乎说只是打开Java控制台也会导致崩溃吗?

If that is the case , see this posting on the Sun Web Site: 如果是这种情况,请参见Sun网站上的这篇文章:

http://bugs.sun.com/view_bug.do?bug_id=6563344 http://bugs.sun.com/view_bug.do?bug_id=6563344

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

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