Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Any way to use Sun JVM for applet in SWT Browser (Windows)?
Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453246] Fri, 01 April 2005 23:42 Go to next message
Eclipse UserFriend
Originally posted by: cervezas.no-spam-pikesoft.com

I can see that things like this have been asked, but I can't see a
definitive answer. I can run my applet in a free-standing instance of IE,
which is configured to use the Sun JVM. But when it's called from the IE
instance created by SWT Browser it ignores this configuration and defaults
to the Microsoft JVM. The MS JVM won't run my applet because it throws a
com.ms.security.SecurityExceptionEx[Host].

Any way to get the SWT Browser to respect the JVM preference set in IE? Or
a suggested workaround?

David

--
David Beers
Pikesoft Mobile Computing
www.pikesoft.com
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453333 is a reply to message #453246] Tue, 05 April 2005 14:35 Go to previous messageGo to next message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
Hi David,

See the SWT FAQ:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#browserplugins

If anyone wishes to contribute a workaround to this, please attach it to bug
59506.

Chris
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453446 is a reply to message #453333] Tue, 05 April 2005 19:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cervezas.no-spam-pikesoft.com

Thanks Chris. I'm not sure if the source of the problem has been identified
correctly. Or maybe just not stated clearly in the FAQ. From my
observation, whether an applet runs inside an SWT Browser on Windows or not
depends on whether it is contained in a single JAR or has to access code in
another JAR. (At least I have one applet that is self-contained and runs
fine and one that uses two JARS that does not. I guess that's not very
conclusive.) I see the same behavior when I try to run the two applets
inside a free-standing instance of IE with the MS JVM: the single-JAR applet
runs, the two-JAR applet throws a com.ms.security.SecurityExceptionEx[Host]
exception. (Note: I am running the applets from the local file system, not
over the Internet, so perhaps the MS JVM sees accessing code in one JAR from
a second one as an illegal attempt to access the file system. Later note: I
just checked )

If I'm right, the problem in the SWT browser is only a problem if your
applet will not run ok in the MS JVM. I don't know too much about applets,
but since the exception I'm getting is in com.ms.security I'm looking at
signing the applet as a possible workaround. I'd be interested in anyone
else's experiences with applets in the SWT Browser to know whether they have
tried signing. I hate to go through all the rigamarole if people already
know this won't work.

David

--
David Beers
Pikesoft Mobile Computing
www.pikesoft.com

"Christophe Cornu" <christophe_cornu@ca.ibm.com> wrote in message
news:d2u7um$7fe$1@news.eclipse.org...
> Hi David,
>
> See the SWT FAQ:
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#browserplugins
>
> If anyone wishes to contribute a workaround to this, please attach it to
bug
> 59506.
>
> Chris
>
>
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453447 is a reply to message #453446] Tue, 05 April 2005 19:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cervezas.no-spam-pikesoft.com

Sent that last post before I was finished writing what I wanted to say. The
"Later note" I was starting to add was that when I try to run my two-JAR
applet over the Internet (in SWT or free-standing) I get the same problem,
so apparently it's not the file system issue that I naively imagined might
be the problem. The question remains as to why some applets *do* run fine
in the SWT Browser.

David

"David Beers" <cervezas@no-spam-pikesoft.com> wrote in message
news:d2unqc$ur7$1@news.eclipse.org...
> Thanks Chris. I'm not sure if the source of the problem has been
identified
> correctly. Or maybe just not stated clearly in the FAQ. From my
> observation, whether an applet runs inside an SWT Browser on Windows or
not
> depends on whether it is contained in a single JAR or has to access code
in
> another JAR. (At least I have one applet that is self-contained and runs
> fine and one that uses two JARS that does not. I guess that's not very
> conclusive.) I see the same behavior when I try to run the two applets
> inside a free-standing instance of IE with the MS JVM: the single-JAR
applet
> runs, the two-JAR applet throws a
com.ms.security.SecurityExceptionEx[Host]
> exception. (Note: I am running the applets from the local file system,
not
> over the Internet, so perhaps the MS JVM sees accessing code in one JAR
from
> a second one as an illegal attempt to access the file system. Later note:
I
> just checked )
>
> If I'm right, the problem in the SWT browser is only a problem if your
> applet will not run ok in the MS JVM. I don't know too much about
applets,
> but since the exception I'm getting is in com.ms.security I'm looking at
> signing the applet as a possible workaround. I'd be interested in anyone
> else's experiences with applets in the SWT Browser to know whether they
have
> tried signing. I hate to go through all the rigamarole if people already
> know this won't work.
>
> David
>
> --
> David Beers
> Pikesoft Mobile Computing
> www.pikesoft.com
>
> "Christophe Cornu" <christophe_cornu@ca.ibm.com> wrote in message
> news:d2u7um$7fe$1@news.eclipse.org...
> > Hi David,
> >
> > See the SWT FAQ:
> >
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#browserplugins
> >
> > If anyone wishes to contribute a workaround to this, please attach it to
> bug
> > 59506.
> >
> > Chris
> >
> >
>
>
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453465 is a reply to message #453447] Wed, 06 April 2005 13:31 Go to previous messageGo to next message
Ron Capelli is currently offline Ron CapelliFriend
Messages: 10
Registered: July 2009
Junior Member
The MS JVM only supports the Java 1.1 language. If an applet requiring
Java2 platform function is encountered, it cannot be run by the MS JVM.
And unfortunately, current JREs that support the Java2 platform (i.e.,
from Sun and IBM) don't work with the SWT Browser on Windows because of
the problem described in the SWT FAQ entry and bug 59506...

....Ron Capelli
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453467 is a reply to message #453465] Wed, 06 April 2005 14:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cervezas.no-spam-pikesoft.com

"Ron Capelli" <capelli@us.ibm.com> wrote in message
news:d30oim$ihm$1@news.eclipse.org...
> The MS JVM only supports the Java 1.1 language. If an applet requiring
> Java2 platform function is encountered, it cannot be run by the MS JVM.

That's not a problem for me. My applets are written with the SuperWaba SDK,
which is Java 1.1 compliant.

> And unfortunately, current JREs that support the Java2 platform (i.e.,
> from Sun and IBM) don't work with the SWT Browser on Windows because of
> the problem described in the SWT FAQ entry and bug 59506...

Can you explain why some applets *do* work fine in the SWT Browser and
others do not? I'm not satisfied with the explanation I am getting
regarding not being able to create a second JVM since in some circumstances
it's fine. Anybody know how to debug an applet while it's running in the MS
JVM?

David
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453471 is a reply to message #453467] Wed, 06 April 2005 17:12 Go to previous messageGo to next message
Ron Capelli is currently offline Ron CapelliFriend
Messages: 10
Registered: July 2009
Junior Member
David Beers wrote:
> "Ron Capelli" <capelli@us.ibm.com> wrote
>> The MS JVM only supports the Java 1.1 language. If an applet requiring
>> Java2 platform function is encountered, it cannot be run by the MS JVM.
>
> That's not a problem for me. My applets are written with the SuperWaba SDK,
> which is Java 1.1 compliant.
>
>> And unfortunately, current JREs that support the Java2 platform (i.e.,
>> from Sun and IBM) don't work with the SWT Browser on Windows because of
>> the problem described in the SWT FAQ entry and bug 59506...
>
> Can you explain why some applets *do* work fine in the SWT Browser and
> others do not? I'm not satisfied with the explanation I am getting
> regarding not being able to create a second JVM since in some circumstances
> it's fine. Anybody know how to debug an applet while it's running in the MS
> JVM?

OK, the simplest explanation is that the applets that do work with the
SWT Browser are those that can be run by the MS JVM, and the ones that
don't work are the ones that cannot be run by the MS JVM for whatever
reason.

I'm very aware of the Java 1.1 vs Java2 platform difference, but if that
doesn't apply in this case, then there is some other reason MS JVM won't
run the applet. Something to look into is what HTML tag (<applet>
<object> <embed>) is used to specify the applet.

Anytime the embedded browser uses the Sun or IBM Java plugin on Windows,
the Java plugin returns an error because it cannot start a second JVM in
the current process...

....Ron Capelli
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453474 is a reply to message #453471] Wed, 06 April 2005 21:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cervezas.no-spam-pikesoft.com

"Ron Capelli" <capelli@us.ibm.com> wrote in message
news:d315gn$aea$1@news.eclipse.org...
> OK, the simplest explanation is that the applets that do work with the
> SWT Browser are those that can be run by the MS JVM, and the ones that
> don't work are the ones that cannot be run by the MS JVM for whatever
> reason.

Ok, if it's as simple as that then this *may* be good news--for me anyway.
The thing I have to figure out is how to debug the applet while it's running
in the MS JVM. Any thoughts?

And thanks very much for your help with this!

David
Re: Any way to use Sun JVM for applet in SWT Browser (Windows)? [message #453519 is a reply to message #453474] Wed, 06 April 2005 23:10 Go to previous message
Ron Capelli is currently offline Ron CapelliFriend
Messages: 10
Registered: July 2009
Junior Member
In native IE, bring up Tools -> Internet Options -> Advanced tab and
look at the options for Java and Microsoft VM. Hopefully you can debug
using native IE, and force the applet to run with the MS JVM by
disabling the Sun Java plugin.

There is no way provided by SWT to bring up the Java console with the
embedded IE browser. I looked at MSDN to see how it might be done
programatically and found the ShowJavaConsole API:

http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/devnotes/winprog/showjavaconsole.asp


....Ron Capelli
Previous Topic:Closing an editor with a PDF ActiveX control
Next Topic:setAlpha and drawing into Images
Goto Forum:
  


Current Time: Tue Mar 02 15:11:43 GMT 2021

Powered by FUDForum. Page generated in 0.02587 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top