2 JavaFX applets in the same JVM
ngalarneau at ABINITIO.COM
ngalarneau at ABINITIO.COM
Tue Jul 8 20:30:39 UTC 2014
Gentlemen,
Thank you for the informative replies.
My understanding with plugin2 and Swing back in Java 6 was that as long as
the jvm parameters for each applet were the same, 2 applets on the same
html page could share the jvm.
I can see, however, that JavaFX running in the native GUI thread would
make it really hard to support 2 applets (and therefore 2
javafx.application.Applications) in the same JVM.
To Kevin's question, we were looking for 2 things from multiple applets in
a shared JVM:
1) reduced resource consumption compared to separate JVMs
2) hopefully easier inter applet communication
With a trivial Java 8 update 20 applet needing 141 Meg, if there are
several, they can start to add up memory wise.
As to #2, we can probably have the multiple applets communicate through
javascript (since the javascript support seems to be pretty strong). Not
as elegant, but it will probably work.
Thanks,
Neil
From: Kevin Rushforth <kevin.rushforth at oracle.com>
To: Richard Bair <richard.bair at oracle.com>,
Cc: Stephen F Northover <steve.x.northover at oracle.com>,
ngalarneau at ABINITIO.COM, openjfx-dev at openjdk.java.net
Date: 07/08/2014 03:48 PM
Subject: Re: 2 JavaFX applets in the same JVM
Hi Neil,
What problem are you trying to solve? Running multiple applets in the same
VM is a means to some end for you, so knowing what you are trying to do
might lead to a discussion of another way to accomplish what you need.
-- Kevin
Richard Bair wrote:
And to top it all off, supporting shared JVMs is extremely security
challenging.
On Jul 8, 2014, at 12:40 PM, Stephen F Northover
<steve.x.northover at oracle.com> wrote:
This would imply that there was more than on distinguished GUI thread per
process. JavaFX runs in the native GUI thread by design and more than one
GUI thread is not supported in JavaFX and on some platforms (ie. Mac).
Steve
On 2014-07-08, 3:31 PM, Kevin Rushforth wrote:
Is running 2 JavaFX applets in the same JVM supported?
No, this is not supported. RT-29969 (and the non-public RT-32321) is about
running multiple applets from the same web page, each in their own JVM. By
design, JavaFX runs each applet in its own VM. It is very unlikely that we
would ever add the ability to run more than JavaFX applet in the same VM.
-- Kevin
ngalarneau at ABINITIO.COM wrote:
Hello,
What is the status of running 2 JavaFX applets in the same JVM
(separate_jvm = false)?
When we try to load 2 applets into the same JVM we get a runtime error (I
think it was class loader related).
When I searched in jira I found RT-29969 (the 2 applet test it refers to
may or may not be in the same JVM) which points to RT-32321 which seems to
be private (it gives me an error when I try to access it).
Is running 2 JavaFX applets in the same JVM supported?
If not, is that a bug or a feature?
Thanks,
Neil
NOTICE from Ab Initio: This email (including any attachments) may contain
information that is subject to confidentiality obligations or is legally
privileged, and sender does not waive confidentiality or privilege. If
received in error, please notify the sender, delete this email, and make
no further use, disclosure, or distribution.
More information about the openjfx-dev
mailing list