title: How to get Desktop class supported under Linux?
body: <p>I am writing a java application and I want to open a link from my program in user's default internet browser. I tried to use class Desktop like this :</p>
  
  <pre><code>if (Desktop.isDesktopSupported()) {
      Desktop desktop = Desktop.getDesktop();
      if (desktop.isSupported(java.awt.Desktop.Action.BROWSE)) {
          try {
              URI uri = new URI(url); // url is a string containing the URL
              desktop.browse(uri);
          }
          catch (URISyntaxException ex) {
              Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  }
  </code></pre>
  
  <p>However first if returns false. My OS is newest version of Ubuntu. Does anybody know how to get that Desktop supported in java?</p>