// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.awt.Desktop;
import java.net.URI;

public class ToMailOrNotToMail {
    public static void main(String[] args) throws Exception {
        // Java 1.6+ & any platform
        Desktop.getDesktop().mail(new URI("mailto:arne@arne"));
        // any Java & Outlook Express
        Runtime.getRuntime().exec("\"C:\\Program Files\\Outlook Express\\msimn.exe\" /mailurl:mailto:arne@arne");
        // any Java & Thunderbird
        Runtime.getRuntime().exec("C:\\Program Files\\Mozilla Thunderbird\\thunderbird \"mailto:arne@arne\"");
        // any Java at Windows
        Runtime.getRuntime().exec("cmd /c start mailto:arne@arne");
    }
}
