简体   繁体   English

如何在applet中完成java.exe进程?

[英]How to finish java.exe process in applet?

There is an applet on a HTML page. HTML页面上有一个applet。 That applet loads a dll library and communicates with an external application through it. 该小程序将加载dll库,并通过该库与外部应用程序进行通信。 I can successfully load and work with that library. 我可以成功加载并使用该库。 That library has functions INIT() and DEINIT() . 该库具有函数INIT()DEINIT()

The issue is when I try to call those functions again, the external app/library says that there is only one process can access to that app. 问题是当我尝试再次调用这些函数时,外部应用程序/库说只有一个进程可以访问该应用程序。 It is an internal check. 这是内部检查。 So I need a way to stop the Java process in order to start the app once again. 因此,我需要一种停止Java进程的方法来再次启动该应用程序。 But if I start the applet once, the Java process doesn't finished until I close the browser tab (or even the whole browser). 但是,如果我一次启动了applet,则直到关闭浏览器选项卡(甚至是整个浏览器),Java程序才会完成。

Is there a way to stop the Java process in the scope of the browser tab? 有没有办法在浏览器选项卡的范围内停止Java进程? And I need Java to start as soon as applet in the HTML page will appear. 而且我需要Java在HTML页面中的applet出现后立即启动。

You can't stop the JVM from the applet, it's managed by the browser. 您不能从小程序中停止JVM,它是由浏览器管理的。

You might consider switching to a Java Web Start application instead, it's started in its own VM. 您可能会考虑切换到Java Web Start应用程序,它是在其自己的VM中启动的。

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

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