Are all Java applets Active X?

Discussion in 'Java' started by Z, Feb 20, 2007.

  1. Z

    Z Guest

    Every applet or JApplet that I create and run causes IE 7 to warn me
    that I am about to use Active X.

    Is there a way to build/write applets and JApplets so that they do not
    make use of Active X and, thus, do not cause this warning? Or is it
    unavoidable?
     
    Z, Feb 20, 2007
    #1
    1. Advertising

  2. On Feb 21, 3:54 am, Z <> wrote:
    > Every applet or JApplet that I create and run causes IE 7 to warn me
    > that I am about to use Active X.
    >
    > Is there a way to build/write applets and JApplets so that they do not
    > make use of Active X and, thus, do not cause this warning?


    If this is that Eolas patent thing, you
    might try writing the applet element using
    JavasCript, which supposedly avoids the user
    having to 'click OK' the applet.

    >...Or is it
    > unavoidable?


    Or you might just launch the applet using
    web start*, to avoid this problem with IE,
    the problems the JS based solution will
    introduce for browsers with JS disabled,
    the next problem with IE, the problems
    with other browsers that have not yet
    been reported..

    * <http://www.physci.org/jws/#jtest>

    Andrew T.
     
    Andrew Thompson, Feb 20, 2007
    #2
    1. Advertising

  3. Z

    Oliver Wong Guest

    "Z" <> wrote in message
    news:OIFCh.365$...
    > Every applet or JApplet that I create and run causes IE 7 to warn me that
    > I am about to use Active X.
    >
    > Is there a way to build/write applets and JApplets so that they do not
    > make use of Active X and, thus, do not cause this warning? Or is it
    > unavoidable?


    Applets (and JApplets) and ActiveX are two completely unrelated
    technologies (one evidence of this is that Linux and Mac desktops typically
    have zero support for ActiveX whatsoever, and yet they have no trouble
    running Java Applets). The warning is thus misleading and leading you down a
    false trail.

    - Oliver
     
    Oliver Wong, Feb 20, 2007
    #3
  4. Z

    Daniel Dyer Guest

    On Tue, 20 Feb 2007 17:27:51 -0000, Oliver Wong <>
    wrote:

    >
    > "Z" <> wrote in message
    > news:OIFCh.365$...
    >> Every applet or JApplet that I create and run causes IE 7 to warn me
    >> that
    >> I am about to use Active X.
    >>
    >> Is there a way to build/write applets and JApplets so that they do not
    >> make use of Active X and, thus, do not cause this warning? Or is it
    >> unavoidable?

    >
    > Applets (and JApplets) and ActiveX are two completely unrelated
    > technologies (one evidence of this is that Linux and Mac desktops
    > typically
    > have zero support for ActiveX whatsoever, and yet they have no trouble
    > running Java Applets). The warning is thus misleading and leading you
    > down a
    > false trail.


    Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    Dan.


    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
     
    Daniel Dyer, Feb 20, 2007
    #4
  5. In article <>, Daniel Dyer wrote:

    > Isn't Sun's Java plugin for IE implemented as an ActiveX control?


    Yes, and the documented workarounds for ActiveX activation will work.



    --
    Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
    Victorville, California PGP:0xE3AE35ED

    It's all fun and games until someone starts a bonfire in the living room.
     
    Steven J. Sobol, Feb 20, 2007
    #5
  6. On Feb 21, 7:26 am, "Steven J. Sobol" <> wrote:
    > In article <>, Daniel Dyer wrote:
    > > Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    >
    > Yes, and the documented workarounds for ActiveX activation will work.


    Some of the earliest solutions I saw to this,
    involved *writing* the applet element using
    JS. Later solutions got more subtle and
    involved a single script placed in the head,
    whereas the page content itself did not require
    any changes.

    I am guessing the latter solution has the JS
    navigating the page DOM, looking for applets
    (or other ActiveX controls) - either to directly
    enable them, or to remove and re-add them.

    Note that while the latter solution degrades
    gracefully to 'just the way it is now', the
    earlier one risks showing no applet at all,
    should JS be disabled*.

    I would strongly recommend using one of
    the later 'single script in the head' type
    solutions if you decide to go this way.

    * No, I do not /know/ of anybody that would
    allow Java in their browser, but no JS.

    Andrew T.
     
    Andrew Thompson, Feb 20, 2007
    #6
  7. Z

    Oliver Wong Guest

    "Richard Maher" <> wrote in message
    news:erfqnt$cv7$...
    > Hi,
    >
    > "Steven J. Sobol" <> wrote in message
    > news:...
    >> In article <>, Daniel Dyer wrote:
    >>
    >> > Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    >>
    >> Yes, and the documented workarounds for ActiveX activation will work.
    >>

    >
    > Can someone please tell me what exactly "Sun's Java plugin for IE" is, and
    > why someone would use it over and above whatever Microsoft ship's with IE
    > already?


    I'm a bit hesitant to jump into this, as it looks like I was wrong about
    browser architecture before, but...

    Most webbrowsers need plugins to handle various content types. For
    example, there's a "Flash" plugin made by Macromedia for handling Flash
    content (you've seen Flash content if you've ever used YouTube to view
    movies, for example). You download the plugin, it integrates with your
    browser (whether IE, netscape-based (e.g. FireFox), or Opera) and then your
    browser can now display Flash content.

    Similarly, you need a Java plugin to display Java applets in your
    browser. Unlike Flash, a couple of companies has "competing" plugins that
    all supprot Java. Sun has one such plugin, and Microsoft used to have a
    plugin, but I think they discontinued it when they discontinued their JVM.

    I haven't used IE7 much, but from my understanding, Microsoft does not
    ship a Java plugin at all with their browsers (not anymore, anyway -- they
    used to ship their own JVM a couple of years ago, but as you've noted, it's
    been discontinued). So you need to get the plugin from somewhere, and Sun's
    plugin is the most commonly used one.

    >
    > Is it also going away when MS pulls support for their JVM?


    I think Sun has no plans to discontinue their Java products, including
    their Java plugin (meaning it'll probably stick around for a while). Sun
    also said they'll release their implemention as open source and when that
    happens, you're guaranteed that it will never "go away".

    >
    > Is it the bit of code that loads Applets from the codebase (which would
    > explain a lot of things)


    Yes.

    >
    > I have downloaded and am running Sun's SDK 1.6 with the Java HotSpot
    > client
    > VM on Windows2000 IE 6. Did I have to do something different to get this
    > "plugin"?


    When you install the SDK, it also installs the JRE as a sub-step of the
    installation process. The plugin is included in the JRE, so you should have
    the plugin now.

    >
    > Is it only IE7? This really sounds disgusting :-(


    I'm gonna avoid this question, since it seems like I don't know as much
    about ActiveX as I thougth I did.

    >
    > Anyone got a reference for the "documented workarounds"?


    Try:

    http://msdn.microsoft.com/library/d.../author/dhtml/overview/activating_activex.asp
    http://activecontent.blogspot.com/

    - Oliver
     
    Oliver Wong, Feb 20, 2007
    #7
  8. Hi,

    "Steven J. Sobol" <> wrote in message
    news:...
    > In article <>, Daniel Dyer wrote:
    >
    > > Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    >
    > Yes, and the documented workarounds for ActiveX activation will work.
    >


    Can someone please tell me what exactly "Sun's Java plugin for IE" is, and
    why someone would use it over and above whatever Microsoft ship's with IE
    already?

    Is it also going away when MS pulls support for their JVM?

    Is it the bit of code that loads Applets from the codebase (which would
    explain a lot of things)

    I have downloaded and am running Sun's SDK 1.6 with the Java HotSpot client
    VM on Windows2000 IE 6. Did I have to do something different to get this
    "plugin"?

    Is it only IE7? This really sounds disgusting :-(

    Anyone got a reference for the "documented workarounds"?

    Cheers Richard Maher

    PS. Sorry if this has been discussed before. I'm always a bit late.
     
    Richard Maher, Feb 20, 2007
    #8
  9. Z

    Daniel Dyer Guest

    On Tue, 20 Feb 2007 23:00:26 -0000, Richard Maher
    <> wrote:

    > Can someone please tell me what exactly "Sun's Java plugin for IE" is,
    > and
    > why someone would use it over and above whatever Microsoft ship's with IE
    > already?


    The Java plugin is part of the Java runtime distribution. The plugin
    itself is a wrapper around the Java virtual machine. As far as I am
    aware, there are two plugins - both wrapping the same JVM. One is an
    ActiveX control and is used by Internet Explorer. The other is a plugin
    that conforms to the Netscape/Mozilla plugin interface and is used by
    Mozilla-based browsers. Opera used to use the Netscape plugin, I'm not
    sure if they still do (they were at some point, on Linux at least,
    launching the JVM directly).

    Microsoft's JVM is compatible (mostly) with version 1.1 of Java. 1.1 is
    ten years old, 6.0 being the most recent version. 1.1 lacks many core
    library classes that we have been taking for granted for years, most
    significantly the Collections Framework and Swing. Without Swing you are
    effectively restricted to GUIs built using AWT, which provides only basic
    UI widgets (no tables, trees, tabs, split panes etc.). Without the
    Collections Framework you either have to use the limited collections
    classes available (Vector and Hashtable) or write your own. You may also
    have trouble using 3rd party libraries since many will have API
    dependencies on the Collection/List/Set/Map interfaces.

    > I have downloaded and am running Sun's SDK 1.6 with the Java HotSpot
    > client
    > VM on Windows2000 IE 6. Did I have to do something different to get this
    > "plugin"?


    No, it's bundled with it. You may have to change the settings in the
    control panel to determine which browsers use it.

    Dan.

    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
     
    Daniel Dyer, Feb 20, 2007
    #9
  10. Z

    Daniel Dyer Guest

    On Tue, 20 Feb 2007 23:15:50 -0000, Daniel Dyer <"You don't need it">
    wrote:

    > You may also have trouble using 3rd party libraries since many will have
    > API dependencies on the Collection/List/Set/Map interfaces.


    And even if they aren't, they are probably compiled with a more recent
    class file format that the Microsoft VM doesn't understand.

    Dan.

    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
     
    Daniel Dyer, Feb 20, 2007
    #10
  11. In article <>, Andrew Thompson wrote:
    > On Feb 21, 7:26 am, "Steven J. Sobol" <> wrote:
    >> In article <>, Daniel Dyer wrote:
    >> > Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    >>
    >> Yes, and the documented workarounds for ActiveX activation will work.

    >
    > Some of the earliest solutions I saw to this,
    > involved *writing* the applet element using
    > JS. Later solutions got more subtle and
    > involved a single script placed in the head,
    > whereas the page content itself did not require
    > any changes.


    One of the simplest workarounds, and I believe this one is endorsed by
    Microsoft, is to create a container like a DIV and set the innerHTML
    attribute...


    --
    Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
    Victorville, California PGP:0xE3AE35ED

    It's all fun and games until someone starts a bonfire in the living room.
     
    Steven J. Sobol, Feb 21, 2007
    #11
  12. In article <erfqnt$cv7$>, Richard Maher wrote:

    > Can someone please tell me what exactly "Sun's Java plugin for IE" is, and
    > why someone would use it over and above whatever Microsoft ship's with IE
    > already?


    Microsoft Java is based on the JDK 1.1.x VM.

    > Is it also going away when MS pulls support for their JVM?


    No, it's not; it's a Sun product, not a Microsoft product.

    > Is it the bit of code that loads Applets from the codebase (which would
    > explain a lot of things)


    Yes, that's done by the Java plugin.

    > I have downloaded and am running Sun's SDK 1.6 with the Java HotSpot client
    > VM on Windows2000 IE 6. Did I have to do something different to get this
    > "plugin"?


    If you don't have it installed, go to Sun's consumer website at
    java.com to download the browser plugin.

    > Is it only IE7? This really sounds disgusting :-(


    No, it's IE6 too, and it was done because Microsoft didn't want to pay
    Eolas for the patents they have on automated ActiveX component
    activation. It's a legal issue, not a technical one, and I doubt M$
    would have done it if they didn't have to to avoid paying Eolas tons
    of money.

    > Anyone got a reference for the "documented workarounds"?


    Google "activex activation", and start here:

    http://support.microsoft.com/kb/555662 (Related to Visual Studio but
    is relevant to any HTML page, even a hand-coded page)

    The solution documented in that KnowledgeBase article should work with
    IE and still maintain compatibility with all other modern web browsers.

    --
    Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
    Victorville, California PGP:0xE3AE35ED

    It's all fun and games until someone starts a bonfire in the living room.
     
    Steven J. Sobol, Feb 21, 2007
    #12
  13. Z

    Z Guest

    Steven J. Sobol wrote:
    > One of the simplest workarounds, and I believe this one is endorsed by
    > Microsoft, is to create a container like a DIV and set the innerHTML
    > attribute...


    DIV?

    One more time, please, but in English!
     
    Z, Feb 21, 2007
    #13
  14. Z

    Alex Hunsley Guest

    Z wrote:
    > Steven J. Sobol wrote:
    >> One of the simplest workarounds, and I believe this one is endorsed by
    >> Microsoft, is to create a container like a DIV and set the innerHTML
    >> attribute...

    >
    > DIV?
    >
    > One more time, please, but in English!


    He means DIV tag.
    http://www.htmlcodetutorial.com/_DIV.html

    lex
     
    Alex Hunsley, Feb 21, 2007
    #14
  15. Z

    Chris Uppal Guest

    Richard Maher wrote:

    > Can someone please tell me what exactly "Sun's Java plugin for IE" is, and
    > why someone would use it over and above whatever Microsoft ship's with IE
    > already?


    That suggests that you may currently be relying on MS's implementation of Java
    for your applets. If so then the relationship between Java and JavaScript may
    be closer than you'll find it easy to achieve otherwise[*]. I don't know for
    sure if that's true -- this is just a warning to check your design (discussed
    in other threads here) to see if it's still practical when using a real
    JVM/plug-in.

    -- chris

    [*] If my distant memory is correct, the MS JVM exposes all Java classes as COM
    objects, and their JavaScript implementation can call COM directly. Neither
    are true in other environments.
     
    Chris Uppal, Feb 21, 2007
    #15
  16. On Feb 21, 11:21 am, "Steven J. Sobol" <> wrote:
    > In article <>, Andrew Thompson wrote:
    > > On Feb 21, 7:26 am, "Steven J. Sobol" <> wrote:
    > >> In article <>, Daniel Dyer wrote:
    > >> > Isn't Sun's Java plugin for IE implemented as an ActiveX control?

    >
    > >> Yes, and the documented workarounds for ActiveX activation will work.

    >
    > > Some of the earliest solutions I saw to this,
    > > involved *writing* the applet element using
    > > JS.

    ....
    > One of the simplest workarounds, and I believe this one is endorsed by
    > Microsoft,


    *

    > ..is to create a container like a DIV and set the innerHTML
    > attribute...


    Do you have a reference for that?
    The only info. I could find at MS that
    dealt with 'Microsoft activex innerhtml'
    <http://msdn.microsoft.com/library/default.asp?url=/workshop/author/
    dhtml/overview/activating_activex.asp>

    *Every* one of those fixes was dependent
    on JS support.

    * Oh, and 'recommended by MS'? You would
    have more chance of convincing me if you'd
    said 'recommended by Bozo the psychopath
    clown'.

    Andrew T.
     
    Andrew Thompson, Feb 21, 2007
    #16
  17. On Feb 21, 11:25 am, "Steven J. Sobol" <> wrote:
    ....
    > http://support.microsoft.com/kb/555662 (Related to Visual Studio but
    > is relevant to any HTML page, even a hand-coded page)


    ...and particularly relevant to my earlier warning
    about writing the entire element using JS.

    To quote the help page..

    "
    ...
    3) document.write('<OBJECT id="myControl1"
    name="myControl1"
    classid="WindowsActiveX.dll#WindowsActiveX.WindowsUserControl"
    width=600 height=272 > </OBJECT>');'
    "

    Andrew T.
     
    Andrew Thompson, Feb 21, 2007
    #17
  18. Z

    Andy Dingley Guest

    On 20 Feb, 16:54, Z <> wrote:
    > Every applet or JApplet that I create and run causes IE 7 to warn me
    > that I am about to use Active X.


    So don't use IE....

    This is a bogus piece of crap invented when M$oft threw their toys out
    of the pram after falling out with Sun. Although Java is unrelated to
    ActiveX, M$oft's IE implementation of support for it conflates and
    confuses the two.

    There are well-documented work-arounds, but they're fairly sucky HTML
    and shouldn't be used blindly, for risk of confusing other browsers.

    * If it's your own browser, upgrade away from IE.

    * If it's an intranet, set up the trust settings to trust yoru
    servers.

    * If it's teh intawebs, switch to Java Web Start, rather than applets.
     
    Andy Dingley, Feb 21, 2007
    #18
  19. Hi Chris,

    Before responding to your post (and going to bed) can I ask you a quick
    question: -

    I'm calling my Applet like this 'var chan =
    document.getElementById("myApplet")' and inside my class definition that
    extends applet I have a variable "pipe" that is an instance of the
    Tier3Socket class and I want JavaScript to be able to invoke methods in
    "pipe" and I am getting a null pointer error if I try and say "byte_count =
    chan.pipe.readMessage(2)".

    a) Can I only call public methods at the Applet Class level from JS? (No big
    deal)
    b) If I say "var getClass = chan.pipe" can I then invoke getClass.xxx()
    methods?
    c) Is it just that I haven't said "public" when I declared "Tier3Socket
    pipe;" (What is the default anyway?)

    I will try it out but If you've got time to reply then please do.

    > That suggests that you may currently be relying on MS's implementation of

    Java
    > for your applets. If so then the relationship between Java and JavaScript

    may
    > be closer than you'll find it easy to achieve otherwise[*]. I don't know

    for
    > sure if that's true -- this is just a warning to check your design

    (discussed
    > in other threads here) to see if it's still practical when using a real
    > JVM/plug-in.


    Everything I'm looking at (control panel, console etc) says "Sun
    Microsystems Inc. Java HotSpot Client VM 1.6.0-b105"; short of running
    Microsofts MSJVM remover tool, I don't know what else to do. Then Daniel
    Dyer said this: -

    [As far as I am
    aware, there are two plugins - both wrapping the same JVM. One is an
    ActiveX control and is used by Internet Explorer. The other is a plugin
    that conforms to the Netscape/Mozilla plugin interface and is used by
    Mozilla-based browsers.]

    This would explain the difference between my Appletviewer retrieval of the
    JAR file and that of IE. But hey I just want to get this working (hopefully
    by this weekend) and if you would be kind enough to look over the code then,
    I would be more than happy if you could point out dependencies and where it
    will fall over in a screaming heap :)

    Cheers Richard Maher

    "Chris Uppal" <-THIS.org> wrote in message
    news:45dc2174$0$761$...
    > Richard Maher wrote:
    >
    > > Can someone please tell me what exactly "Sun's Java plugin for IE" is,

    and
    > > why someone would use it over and above whatever Microsoft ship's with

    IE
    > > already?

    >
    > That suggests that you may currently be relying on MS's implementation of

    Java
    > for your applets. If so then the relationship between Java and JavaScript

    may
    > be closer than you'll find it easy to achieve otherwise[*]. I don't know

    for
    > sure if that's true -- this is just a warning to check your design

    (discussed
    > in other threads here) to see if it's still practical when using a real
    > JVM/plug-in.
    >
    > -- chris
    >
    > [*] If my distant memory is correct, the MS JVM exposes all Java classes

    as COM
    > objects, and their JavaScript implementation can call COM directly.

    Neither
    > are true in other environments.
    >
    >
     
    Richard Maher, Feb 21, 2007
    #19
  20. Z

    Chris Uppal Guest

    Richard Maher wrote:

    > I'm calling my Applet like this 'var chan =
    > document.getElementById("myApplet")' and inside my class definition that
    > extends applet I have a variable "pipe" that is an instance of the
    > Tier3Socket class and I want JavaScript to be able to invoke methods in
    > "pipe" and I am getting a null pointer error if I try and say "byte_count
    > = chan.pipe.readMessage(2)".
    >
    > a) Can I only call public methods at the Applet Class level from JS? (No
    > big deal)
    > b) If I say "var getClass = chan.pipe" can I then invoke getClass.xxx()
    > methods?
    > c) Is it just that I haven't said "public" when I declared "Tier3Socket
    > pipe;"


    I don't really know, I'm afraid. If the Live Connect guide I'm looking at is
    at all relevant (I don't know for sure that you are usng Live Connect, or even
    if LC still exists !), then the answer to (b) /should/ be "yes". Other than
    that, I'm guessing, but I wouldn't be at all surprised if the answer to all
    three questions was "yes" -- but that's only because that's how I'd have
    designed it, not because I know how the JS integration actually works.

    (BTW (c) confused me a little, I'm assuming that you have just choosen
    "getClass" as the arbitrary name for a variable, you're not attempting to call
    the pipe object's getClass() method.)

    It might sound silly, but is there any chance that your applet's "pipe" field
    actually /is/ null ? It's worth adding some tracing or something just to
    double check...


    > (What is the default anyway?)


    The default for classes, fields, and methods is so-called "package private",
    which means that the class, field, or method isn't supposed to be visible from
    outside its own package -- JS doesn't /have/ to honour that (it could just
    ignore it, since Java protections don't apply if you are using JNI), but I'd
    guess that the designers would attempt to mimic Java semantics as far as they
    could and so they won't expose non-public members.


    > Everything I'm looking at (control panel, console etc) says "Sun
    > Microsystems Inc. Java HotSpot Client VM 1.6.0-b105"; short of running
    > Microsofts MSJVM remover tool, I don't know what else to do.


    Sounds good. If you want to double-check, there's a system property
    ("java.vendor") you can check from your applet code to see the maker of the JVM
    you are actually running in (as opposed to the one that's installed and you
    /hope/ you are running in ;-). There's an example here:
    http://www.javaworld.com/javatips/jw-javatip53.html


    One other thing. I have just found this on the Web. It's clearly long out of
    date, but it may still be relevant or even correct.
    http://www.unix.org.ua/orelly/web/jscript/ch19_07.html
    If it is then that may explain your problems too. (Easy way to check: run your
    applet under FireFox and see what changes...)

    -- chris
     
    Chris Uppal, Feb 21, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eitan

    Dotnet versus Java-Applets

    Eitan, Nov 8, 2004, in forum: ASP .Net
    Replies:
    40
    Views:
    4,453
    =?Utf-8?B?RXh0cmVtZSBEYXRhc2V0cw==?=
    Aug 6, 2005
  2. JFA
    Replies:
    4
    Views:
    374
  3. juraj
    Replies:
    1
    Views:
    652
    Andrew Thompson
    Mar 2, 2007
  4. Replies:
    2
    Views:
    1,019
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Oct 14, 2007
  5. carlos seramos
    Replies:
    2
    Views:
    521
    carlos seramos
    Aug 1, 2003
Loading...

Share This Page