Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 636083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:28:35+00:00 2026-05-13T20:28:35+00:00

Just wondering if anyone can help me with a problem I’ve come across in

  • 0

Just wondering if anyone can help me with a problem I’ve come across in Java.

Is there functionality within Java to produce a section of code that will open the default email application on a user’s PC? (I guess almost like a fancy mailto link…)

If there is – is it possible to populate fields such as the To and Subject fields?

Thanks,
Mike.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:28:35+00:00Added an answer on May 13, 2026 at 8:28 pm

    Desktop.mail(URI mailtoURI) is your friend!

    Javadoc:

    Launches the mail composing window of the user default mail client, filling the message fields specified by a mailto: URI.

    A mailto: URI can specify message fields including "to", "cc", "subject", "body", etc. See The mailto URL scheme (RFC 2368) for the mailto: URI specification details.

    Example Code:

    Desktop desktop;
    if (Desktop.isDesktopSupported() 
        && (desktop = Desktop.getDesktop()).isSupported(Desktop.Action.MAIL)) {
      URI mailto = new URI("mailto:john@example.com?subject=Hello%20World");
      desktop.mail(mailto);
    } else {
      // TODO fallback to some Runtime.exec(..) voodoo?
      throw new RuntimeException("desktop doesn't support mailto; mail is dead anyway ;)");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if anyone can help me with this annoying but trivial (in terms of
I was wondering if anyone can help me. I'm using Adobe Acrobat Pro 9
I've run into a bit of a problem with my class hierarchy, in a
I have a quick question about fetching results from a weakly typed cursor and
I'm having some trouble parsing malformed XML in PHP. In particular I'm querying a
Alright, so I'm building a web app that provides music information (i.e. info on
I am working with a 2-dimensional array of structs which is a part of
MicrosoftMvcJQueryValidation.js is used by ASP.NET MVC 2 for client side validation. Having problems with
In a winforms app, in a form's Load event, add the following line: throw

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.