title: No application is associated with the specified file for this operation. error
body: <p>I have tried to open a .jpg file in default program in this way:</p>
  
  <pre><code>import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.IOException;
  
  public class Test {
  public static void main(String[] args) throws IOException {
      File image = new File(System.getProperty("user.home") +         
  "/Desktop/project/XL-116/DATAFILE17.jpg");
      try {
          java.awt.Desktop.getDesktop().open(image);
      } catch (FileNotFoundException ex) {
          // .....
      }
  }
  }
  </code></pre>
  
  <p>And I have got this error:</p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Failed to open C:\Users\khuda 
  Dad\Desktop\project\XL-116\DATAFILE17.jpg. Error message: No application is 
  associated with the specified file for this operation.
  
  at sun.awt.windows.WDesktopPeer.ShellExecute(Unknown Source)
  at sun.awt.windows.WDesktopPeer.open(Unknown Source)
  at java.awt.Desktop.open(Unknown Source)
  at Test.main(Test.java:9)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xOUSq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xOUSq.jpg" alt="Screenshot of program association"></a></p>
  
  <p>And I have checked the default program. There's nothing wrong. So what is the problem?</p>