Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6663474

Desktop mail operation opens IE recursively for atleast 40 times when there is no mail client instal

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      Sun bug template
      ----------------
      SYNOPSIS
      --------
      Desktop mail operation opens IE recursively for atleast 40(some times 70 times) times when there is no mail client installed in it.

      OPERATING SYSTEM(S):
      --------------------
      Windows Longhorn

      FULL JDK VERSION(S):
      -------------------
      java version "1.6.0_04-ea"
      Java(TM) SE Runtime Environment (build 1.6.0_04-ea-b04)
      Java HotSpot(TM) Client VM (build 10.0-b17, mixed mode)

      DESCRIPTION:
      ------------
      PROBLEM DESCRIPTION
      Desktop mail operation opens IE recursively for atleast 40(some times 70 times) times when there is no mail client installed in it.It will throw an error saying that mail client is not associated & opens IE recursively.

      STEPS TO REPRODUCE
      ------------------
      1. Install the above mentioned failing build in a Windows Longhorn m/c where there is no default mail client.
      2. Set PATH to java.
      3. javac DesktopTest.java
      4. java DesktopTest

      It will throw an error saying that mail client is not associated & opens IE recursively for atleast 40 times.

      TESTCASE:
      -----------
      import java.awt.Desktop;
      import java.net.URISyntaxException;
      import java.net.URI;
      import java.awt.HeadlessException;
      import java.io.*;

      public class DesktopTest{

      public static void main(String args[]){

      Desktop desktop=null;
      String userInputStr = "###@###.###";
      URI uri = null;

      if(Desktop.isDesktopSupported()){
      try{
      desktop = Desktop.getDesktop();
      }
      catch(HeadlessException he){
      System.out.println("GraphicsEnvironment is headless, got a Headless Exception");
      }
      }
      else{
      System.out.println("Desktop class is not supported on this platform");
      }
      try{

      if (userInputStr != null){
      try{
      uri = new URI("mailto", userInputStr, null);

      if (uri != null){
      desktop.mail(uri);
      }
      else{
      desktop.mail();
      System.out.println("Mail URI is null");
      }
      }catch(URISyntaxException use) {
      }catch(IOException ioe){
      System.out.println("Got an IO Exception while mailing.");
      }
      }
      }catch(IllegalArgumentException e){
      }
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              art Artem Ananiev
              Reporter:
              elarsen Erik Larsen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: