Determen Java evalibility and version.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dani Shapira

    Determen Java evalibility and version.

    Hi.
    can anyone help me with how to find if JAVA is evalible and if yes,
    of what version?
    Thanks
    Dani
  • Randy Webb

    #2
    Re: Determen Java evalibility and version.

    Dani Shapira wrote:
    [color=blue]
    > Hi.
    > can anyone help me with how to find if JAVA is evalible and if yes, of
    > what version?[/color]

    comp.lang.java is over there ============>

    Java != Javascript

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

    Comment

    • Dani Shapira

      #3
      Re: Determen Java evalibility and version.

      Randy Webb wrote:[color=blue]
      > Dani Shapira wrote:
      >[color=green]
      >> Hi.
      >> can anyone help me with how to find if JAVA is evalible and if yes,
      >> of what version?[/color]
      >
      >
      > comp.lang.java is over there ============>
      >
      > Java != Javascript
      >[/color]
      I know that Java and Javascript is not the same!!!!
      The quetion is: How can I, in JavaScript, find out if Java is avaliable
      for this browser to run applet og later page.

      Comment

      • Martin Honnen

        #4
        Re: Determen Java evalibility and version.



        Dani Shapira wrote:

        [color=blue][color=green]
        >> Dani Shapira wrote:
        >>[color=darkred]
        >>> can anyone help me with how to find if JAVA is evalible and if yes,
        >>> of what version?[/color][/color][/color]
        [color=blue]
        > The quetion is: How can I, in JavaScript, find out if Java is avaliable
        > for this browser to run applet og later page.[/color]

        Most browsers should support
        if (navigator.java Enabled()) {
        ...
        }
        Testing the Java version is probably better done then in a Java applet
        itself, only a few browsers (Mozilla, Opera) support LiveConnect
        JavaScript->Java direct access e.g.
        if (navigator.java Enabled() && typeof java != 'undefined') {
        alert(java.lang .System.getProp erty('java.vers ion'));
        }

        As long as browsers are using the Sun Java plugin you can also look into
        the navigator.mimeT ypes e.g.

        var mimeType = navigator.mimeT ypes ?
        navigator.mimeT ypes['application/x-java-applet'] : null;
        if (mimeType) {
        var plugin = mimeType.enable dPlugin;
        if (plugin) {
        alert(plugin.de scription);
        }
        }
        for me here on Windows that shows
        Java Plug-in 1.5.0_01 for Netscape Navigator (DLL Helper)
        so you could try to extract the version from that string.

        But IE/Win doesn't support navigator.mimeT ypes for such stuff.


        --

        Martin Honnen

        Comment

        • Randy Webb

          #5
          Re: Determen Java evalibility and version.

          Dani Shapira wrote:[color=blue]
          > Randy Webb wrote:
          >[color=green]
          >> Dani Shapira wrote:
          >>[color=darkred]
          >>> Hi.
          >>> can anyone help me with how to find if JAVA is evalible and if yes,
          >>> of what version?[/color]
          >>
          >>
          >>
          >> comp.lang.java is over there ============>
          >>
          >> Java != Javascript
          >>[/color]
          > I know that Java and Javascript is not the same!!!!
          > The quetion is: How can I, in JavaScript, find out if Java is avaliable
          > for this browser to run applet og later page.[/color]

          In short, you can't reliably. There are too many other factors that
          affect it, as Martin pointed out. It also fails if scripting is disabled
          or not present. And these very reasons are why I directed you to a Java
          Newsgroup. The Java gurus are better prepared to tell you how, in Java,
          determine what you are wanting to know.

          comp.lang.java

          --
          Randy
          comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

          Comment

          Working...