Results 1 to 7 of 7
  1. #1
    Basit is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Question Direct to URL to download java using JOptionPane

    Hi to all,
    Hope you all will be fine.I have a question that i have an applet that records the sound.It's work fine, Now i want to add a functionality that when the applet run it first check that whether java is installed on your system or not if not then it shows a pop ups that Java is not installed click on the link to download java and of course The JOptionPnae.showMessageDialog contains the message and as well as link. My question is how i add a link to JPptionPane so when i click on the link, it direct me to JDK download page.
    The part to check java installed, i think is done with checking System.getProperties() method.Please confirm it.
    Thanks in advance

  2. #2
    Kruptein is offline Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0

    Default

    If java isn't installed, how will you get the applet running?

  3. #3
    Basit is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Smile

    Hi:D,
    Hope you will be fine:D.Yah that's right.Ok Actually what happened i have an email client with recorder embeded in it.If you want to record a voice message, sign in and record the voice.Once one of my friend want to use it without java installed in his system.So when he signed in, the recorder not shown because java is not installed in his system.
    If you are using firefox then it shows a message that required plugin is missing but in windows explorer it didn't show any message.
    So actually i want to ask that in this situation how i show a message that java is not installed and rediredt it to java website download page.
    :)One thing that i want to tell you,i really enjoyed your answer :D.But anyway thanks for your reply.Hope you understand what i meant.May be its explorer issue.
    Thank you :)

  4. #4
    Kruptein is offline Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0

    Default

    You enjoyed my answer? Lol :)
    Well I would just show a message above (the applet), beneath or somewhere else with the text:If you can't see the applet please install <a href='linktojava'>java</a>

    Maybe there is a feature in html or javascript which makes popupbars, but if you want to do that you will have to google'it :)

    Hope I helped you a bit ;)

  5. #5
    Basit is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Wink

    Hi :) ,
    Thanks for your help.Thank you :);)

  6. #6
    Basit is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Default

    Hi,
    Thanks i tried it by putting the link to java in the HTML file and it works means its going to java website but i didn't try it without java installed. I m working on modifying my applet then i give it a try after finalizing it.
    Thanks

  7. #7
    Basit is offline Member
    Join Date
    Aug 2009
    Posts
    8
    Rep Power
    0

    Thumbs up

    Hi ;),
    Hope you all are fine. I did, what i want using JavaScript.Thanks to everyone for his help. I do this by Google and find the code below

    Java Code:
    <body>
    <script language="Javascript" type="text/javascript">
         if(!navigator.javaEnabled()){
              alert('Enable your java to expeirience this java enhanced page or\n   try install it...');
             window.open('InstallingJAVA.html');
              //location.replace('java url');
             location.replace('InstallingJAVA.html');
        }
    </script>
    <noscript>
    Enabled javascript please
    </noscript>
    
    <?php
    
    $applet='<APPLET CODE = "Applet.class" ARCHIVE = "Applet.jar" WIDTH = "240" HEIGHT = "210" NAME = "xxxxxx" MAYSCRIPT = true>
        
      
        <PARAM NAME="uid"  VALUE="'.$id.'">
        <PARAM NAME="uname"    VALUE="'.$uname.'">
    
    </APPLET> ';
    echo $applet;
    
    ?>
    </body>
    </head>
    Again thanks to everyone ;):)

Similar Threads

  1. Can you print direct to printer?
    By tghn2b in forum New To Java
    Replies: 0
    Last Post: 02-26-2009, 08:58 AM
  2. Replies: 5
    Last Post: 10-07-2008, 05:10 PM
  3. how direct her/ him to the Suns download page?
    By willemjav in forum Java Applets
    Replies: 1
    Last Post: 04-17-2008, 04:03 PM
  4. how to download using java
    By leonard in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 05:36 PM
  5. Help with download java api
    By fernando in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 02:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •