Open Mail client in Java

Description

The following code shows how to open Mail client.

Example


/*from   www  . ja va  2 s  . c om*/
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;

public class Main {
  public static void main(String[] a)throws Exception {
      Desktop desktop = null;
      if (Desktop.isDesktopSupported()) {
        desktop = Desktop.getDesktop();
      }
      desktop.mail();
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Development »




Java Algorithms
Java Clipboard
Java Compiler
Java Desktop
Java Virtual Machine
Java Math
OS
Random
Java Robot
Java RuntimeMXBean
Java Timer
Java UUID
Java Internationalization