Solved

email

Posted on 2004-08-31
9
172 Views
Last Modified: 2013-11-24
dont know if this is relevant to java but here goes

i have opened a web site in a Jeditorpane, how can i click on a email address and open up say outlook express 6 ?
0
Comment
Question by:rimmer0007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
9 Comments
 
LVL 92

Accepted Solution

by:
objects earned 205 total points
ID: 11947770
you need to add a HyperlinkListener to your pane (assuming the email address is a link), and have it use Runtime.exec() to fire up outlook.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11947771
Add a HyperlinkListener and Runtime.exec OE.
0
 
LVL 92

Expert Comment

by:objects
ID: 11947791
to start up the mail client try:

Runtime.getRuntime().exec("cmd.exe /C start mailto:xxx@yyy.com");    
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 92

Expert Comment

by:objects
ID: 11947805
your listener would look something like:

public class MyHyperlinkListener implements HyperlinkListener
{
   public void hyperlinkUpdate(HyperlinkEvent e)
   {
       URL url = e.getURL();
       if (url.getProtocol().startsWith("mailto"))
       {
          Runtime.getRuntime().exec("cmd.exe /C start "+url);    
       }
   }
}

 
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11947827
Start the program in a separate thread in the listener - it should not be executed in the event handling thread
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 11952793
>> it should not be executed in the event handling thread

Should it matter if we're not using waitFor () ?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question