How do I close a browser window that was opened by Java Web Start
Asked Answered
F

0

1

I have a java app which is running as an applet. Since plugin support is going away in the browser, we are trying to see how well the applet will run in Java Web Start.

However, our app currently opens secondary browser windows using the appletContext.showDocument(URL, target).

Java Web Start unfortunately ignores the target, so we are not able to name the window (hence also not able to later close the window).

Is there a way, within Web Start, to maintain a handle on all programatically opened windows, so that they can later be programatically closed?

Fax answered 3/3, 2016 at 19:2 Comment(3)
OK, so you are running a Java application as a Swing client or what via JavaWebstart? And you are trying to launch a URL or show the file behind the URL in a browser window, which you later want to close. Is that a correct assumption?Arabia
That is a correct assumption. We're using good old AWT. I can open the window, but have no way to later close it.Fax
so I ended up solving this by opening a new window which executes javascript to close the original browser window.Fax

© 2022 - 2024 — McMap. All rights reserved.