?
Solved

email

Posted on 2004-08-31
9
Medium Priority
?
175 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 820 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

764 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