Java Code to scrape a hotmail address book

Hi all... Can anyone help with trying to scrape a hotmail address book based on the user-id and password given with the help of a java program.. I tried using HTML Unit to do this but the process seems too tedious.. and cant really figure out the hidden variables n stuff in the hotmail website.
Please help me out.... !! thanx !!

Yes i did try that though... But it didnt work... I've made use of HTMLUnit to do this .. I've extracted all the hidden variables and tried to re-post them.. But still wasnt able to sign in to Hotmail through Java.. Here's the code that i tried...
String PwdPad="IfYouAreReadingThisYouHaveTooMuchFreeTime";
          final WebClient webClient=new WebClient(BrowserVersion.INTERNET_EXPLORER_6_0);
          webClient.setRedirectEnabled(true);          
          //Get the hotmail page
          final URL url=new URL("http://www.hotmail.com");
          HtmlPage homePage=null;
          homePage=(HtmlPage)webClient.getPage(url);
          Search(homePage);
          final HtmlForm form=homePage.getFormByName("f1");
          final HtmlSubmitInput button=(HtmlSubmitInput) form.getInputByName("SI");
          //Settting the user name and password
          final HtmlTextInput text1=(HtmlTextInput) form.getInputByName("login");
          final HtmlPasswordInput text2=(HtmlPasswordInput) form.getInputByName("passwd");
          //Hidden Variables
          final HtmlHiddenInput ppsx=(HtmlHiddenInput) form.getInputByName("PPSX");
          final HtmlHiddenInput pwdpad=(HtmlHiddenInput) form.getInputByName("PwdPad");
          final HtmlHiddenInput ppft=(HtmlHiddenInput) form.getInputByName("PPFT");
          System.out.println("The Action is:: "+form.getActionAttribute());
          //Re-posting the Entries (PPSX,Login,Password,PwdPad,PPFT)
          int len;
          len=PwdPad.length()-pass.length();
          PwdPad = PwdPad.substring(0, len);
          text1.setValueAttribute(email);
          text2.setValueAttribute(pass);
          //ppsx.setValueAttribute( ppsx.getValueAttribute());
          //pwdpad.setValueAttribute( PwdPad);
          //ppft.setValueAttribute( ppft.getValueAttribute());
          System.out.println("user:"+text1.getValueAttribute() + " password:" + pass+" ppsx:"+ppsx.getValueAttribute()+" PwdPad:"+pwdpad.getValueAttribute()+" ppft:"+ppft.getValueAttribute() + " login opts:");
          //URL postURL = new URL ("https://login.live.com/ppsecure/post.srf?id=2&bk=1185180903") ;
          URL postURL = new URL (form.getActionAttribute()) ;
          WebRequestSettings webRequestSettings = new WebRequestSettings(postURL,SubmitMethod.POST);
          String requestBody = "PPSX="+ ppsx.getValueAttribute() +"&PwdPad="+PwdPad+"&login=email%40hotmail.com&passwd="+pass+
                    "&LoginOptions=2&PPFT=" + ppft.getValueAttribute() ;
          webRequestSettings.setRequestBody(requestBody);
          //HtmlPage page= ( HtmlPage ) webClient.getPage(webRequestSettings);
          HtmlPage page=(HtmlPage)button.click();
          System.out.println(page.asText());

Similar Messages

  • Importing Hotmail Address Book using Jakarta HttpClient

    Hi,
    I am using jakarta httpclient to import hotmail address book. For that i am loading the login form first and then retrieving dynamic parameters and then posting the form for authentication of user.
    I am unable to authenticate user after posting the form , it redirects me to the login page.
    Can somebody help me to figure out what i am missing in my code??
    Following is the code i have written so far:
    (To run java one will need to enter hotmail emailId and password in the loginData)
    package msn.contacts.fetcher;
    import java.io.InputStream;
    import org.apache.commons.httpclient.Header;
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.HttpStatus;
    import org.apache.commons.httpclient.NameValuePair;
    import org.apache.commons.httpclient.cookie.CookiePolicy;
    import org.apache.commons.httpclient.methods.GetMethod;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.cyberneko.html.parsers.DOMParser;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class MSNContactsFetcher {
         private String msnLoginUrl = "http://login.live.com/login.srf";
         public void login(){
              HttpClient httpClient = new HttpClient();
              httpClient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
              int statusCode = -1;
              InputStream responseStream = null;
              DOMParser parser = null;
              InputSource source = null;
              try{
                   GetMethod loadForm = new GetMethod(msnLoginUrl);
                   loadForm.setFollowRedirects(true);
                   statusCode = httpClient.executeMethod(loadForm);
                   /*Header[] headers = loadForm.getResponseHeaders();
                   for(int i= 0;i<headers.length;i++){
                        System.out.println("Header name:: " + headers.getName() + " value::: " + headers[i].getValue());
                   System.out.println("Hotmail Status Code::: " + statusCode );          
                   if(statusCode == HttpStatus.SC_OK){
                        System.out.println("Hotmail Login Form Loaded Successfully");
                        System.out.println(loadForm.getResponseBodyAsString());
                        //System.exit(1);
                        String PPFT = null;
                        String PPSX = null;
                        String loginFormAction;
                        parser = new DOMParser();
                        responseStream = loadForm.getResponseBodyAsStream();
                        source = new InputSource(responseStream);
                        parser.parse(source);
                        Node form = parser.getDocument().getElementsByTagName("form").item(0);
                        NamedNodeMap attributes = form.getAttributes();
                        String formAction = attributes.getNamedItem("action").getNodeValue();
                        System.out.println("Form action ::: " + formAction);
                        NodeList inputElements = parser.getDocument().getElementsByTagName("input");
                        Node inputNode;
                        String name;
                        for(int i=0;i<inputElements.getLength();i++){
                             inputNode = inputElements.item(i);
                             name = inputNode.getAttributes().getNamedItem("name").getNodeValue();
                             //System.out.println(name + " " + inputNode.getAttributes().getNamedItem("value").getNodeValue() );
                             if(name.equals("PPFT")){
                                  PPFT = inputNode.getAttributes().getNamedItem("value").getNodeValue();
                             else if(name.equals("PPSX")){
                                  PPSX = inputNode.getAttributes().getNamedItem("value").getNodeValue();
                             else if(PPFT != null && PPSX!= null)
                                  break;
                             else
                                  continue;
                        System.out.println("PPFT::: " + PPFT + " PPSX::: " + PPSX );
                        NameValuePair[] loginData = {
                                  new NameValuePair("PPSX",PPSX),
                                  new NameValuePair("PwdPad","IfYouAreReadingThisYouHaveTooMuc"),
                                  new NameValuePair("login","<emailId>"),
                                  new NameValuePair("passwd","<password>"),
                                  new NameValuePair("LoginOptions","3"),                              
                                  new NameValuePair("PPFT",PPFT)                              
                        PostMethod postLoginForm = new PostMethod(formAction);                         
                        postLoginForm.setRequestBody(loginData);
                        httpClient.executeMethod(postLoginForm);
                        statusCode = postLoginForm.getStatusCode();
                        System.out.println("Status Code::: " + statusCode);
                        String responseString = postLoginForm.getResponseBodyAsString();
                        System.out.println("Response string:: " + responseString);
              }catch(Exception ex){
                   System.out.println("Exception Occurred -->> " + ex.getMessage());
                   ex.printStackTrace();
         public static void main(String[] args) {
              System.getProperties().setProperty("httpclient.useragent", " Mozilla/5.0 (Win98; I;Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4");
              System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.SimpleLog");
              System.setProperty("org.apache.commons.logging.simplelog.showdatetime","true");
              System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire.header","debug");
              MSNContactsFetcher msn = new MSNContactsFetcher();
              msn.login();

    are you having issues with the initial login, or is hotmail successfully taking your information, but failing to remember it when you access more of the site for address book information gathering?
    If the first part is happening, you're probably not setting up your connection within a SSL environment correctly (I'm only guessing that's what hotmail uses, as I'm not a hotmail user). There's plenty of documentation on apache's jakarta site on how to do this/troubleshoot it.
    If you're connecting, and it's not holding the information, then the cookie storing is not set up right. In that case, you may want to post a new topic more specifically relating to cookies (probably want to do it in the networking section of these forums, as it's far more pertinent there).
    I wish I could help you more, but I am far more familiar with instantiating web connections via the UrlConnection class, and not with the Jakarta Commons libraries. :(

  • Can i download my Hotmail address book onto my phone?

    Or do i have to enter this manually for each contact?
    I'd really appreciate it if you could help.
    Thanks,

    I don't do Hotmail, but if you can determin how to download or export your hotmail address book to your PC (like an ASCII, CSV or Excel file), then you can import that data into Outlook to sync to your BlackBerry.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Hotmail address book no longer works

    My hotmail address book no longer works. When I press "To" in the address bar, nothing comes up. If I press "reply" to respond to an email then again, nothing happens. I have to copy and paste the address. The only way I can find out an address is to go into the search box, bring up an old email and paste the address from it. This problem happened a while ago and seems to be after one of the automatic Firefox updates. Please can you advise? Thanks

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Importing yahoo, gmail & hotmail address book  using JSP

    Hi,
    i want to import the yahoo , gmail & hotmail contacts to my local MS access database. please give me the algorithm for importing contacts & if any one having the sample codes send it to me.. if any greatly appriciated.
    Thanks in advance.
    Regards
    Chinna

    are you having issues with the initial login, or is hotmail successfully taking your information, but failing to remember it when you access more of the site for address book information gathering?
    If the first part is happening, you're probably not setting up your connection within a SSL environment correctly (I'm only guessing that's what hotmail uses, as I'm not a hotmail user). There's plenty of documentation on apache's jakarta site on how to do this/troubleshoot it.
    If you're connecting, and it's not holding the information, then the cookie storing is not set up right. In that case, you may want to post a new topic more specifically relating to cookies (probably want to do it in the networking section of these forums, as it's far more pertinent there).
    I wish I could help you more, but I am far more familiar with instantiating web connections via the UrlConnection class, and not with the Jakarta Commons libraries. :(

  • Add area codes to multiple contacts in address book

    We are having to add area codes to contacts due to having to dial 10 digit phone numbers. Is there a way to do this for multiple contacts at once, rther than changing each one?

    Export your database to a csv file, open in a spreadsheet, add area codes and then bring the file back.

  • Source code for address book

    hi everyone,
    i have to make a contact wizard for iphone, i have allready designed the view for contact wizard using navigation controller, there are 3 pages total which includes UITextFields, PickerView, and Table View.
    Now i dont know where to write code for add contacts in address book database.
    can any one help me by some code sample...?????
    i have written code in a function which is called on the Navigation toolbar Button
    the code is
    ABRecordRef aRecord = ABPersonCreate();
    CFErrorRef anError = NULL;
    ABRecordSetValue(aRecord, kABPersonFirstNameProperty,
    CFSTR("Jijo"), &anError);
    ABRecordSetValue(aRecord, kABPersonLastNameProperty,
    CFSTR("Pulikkottil"), &anError);
    if (anError != NULL) {
    NSLog(@"error while creating..");
    CFStringRef firstName, lastName;
    firstName = ABRecordCopyValue(aRecord, kABPersonFirstNameProperty);
    lastName = ABRecordCopyValue(aRecord, kABPersonLastNameProperty);
    ABAddressBookRef addressBook;
    CFErrorRef error = NULL;
    addressBook = ABAddressBookCreate();
    BOOL isAdded = ABAddressBookAddRecord (
    addressBook,
    aRecord,
    &error
    if(isAdded){
    NSLog(@"added..");
    if (error != NULL) {
    NSLog(@"ABAddressBookAddRecord %@", error);
    error = NULL;
    BOOL isSaved = ABAddressBookSave (
    addressBook,
    &error
    if(isSaved){
    NSLog(@"saved..");
    if (error != NULL) {
    NSLog(@"ABAddressBookSave %@", error);
    CFRelease(aRecord);
    CFRelease(firstName);
    CFRelease(lastName);
    CFRelease(addressBook);
    But it is showing many errors.
    can any one give me some advice how to manage it?

    You probably won't get much help here... this is a user forum, not a developer or programmer forum.

  • Using the Photo/send a link/ function does not link to my address book

    Having upgraded to FF4 using the Photo/your albums/send a link/ the 'To' data input line does not interact with my Hotmail Address Book.

    This usually means that the address book data file is corrupt.
    I'd suggest you export your misbehaving address book to an LDIF file, delete the original address book then re-import its data from the LDIF file.
    Note that you won't be allowed to delete either ''Personal Address Book'' (PAB) nor ''Collected Addresses'' (CA) within Thunderbird. You'll have to close Thunderbird, open its profile and delete:
    ''abook.mab'' for PAB, or
    ''history.mab'' for CA.
    When you next run Thunderbird, it'll create a new empty address book to replace the one you deleted. Import your address to a new temporary address book, then move the Contacts (drag-and-drop) into the preferred address book.

  • Acrobat Address Book methods in Digital Signature API

    Can anyone point me to code samples using the Acrobat Address Book methods in the Digital Signature API (AABFindCertsByName, AABGetCertTrust for example)?

    I don't remember seeing any, sorry.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 8 Dec 2011 16:32:46 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Acrobat Address Book methods in Digital Signature API
    Acrobat Address Book methods in Digital Signature API
    created by jmmorgan11<http://forums.adobe.com/people/jmmorgan11> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4072845#4072845

  • Getting Email Address from address book

    Hi,
    I'm having some problems in GroupWise 6 which I'd appreciate some help
    with.
    I'm trying to search an address book for an email address based on the
    "from" name in a newly created email, where the address book name format
    is "LastName, FirstName". I've tried a number of approaches, none of which
    seems to work, as I shall describe below.
    1. I get the displayed name in the "from" textbox of the mail by executing
    ItemGetText. Now, regardless of the address book name format, the name I
    receive is in the format "FirstName LastName" (eg "Dave Smith"). When I
    then execute AddressBookResolveFullName on this display name, I am
    returned "Token Execution Failed" presumably because the address book
    lookup is expecting a name in the format "Smith, Dave" (incidentally, the
    same code works fine when the address book name format is set to
    "FirstName LastName").
    2. As an alternative approach, I get the current UserID by executing
    EnvUserId. This gives me a UserId in a format such as
    [email protected]. I then execute AddressBookGetFullName in the
    expectation of being given the display name (hopefully in "LastName,
    FirstName format"), which I could then use in executing
    AddressBookResolveFullName. However, AddressBookGetFullName also returns
    "TokenExecutionFailed". This may be due to the format of the UserID I am
    using not matching what is expected by AddressBookGetFullName. I'm not
    entirely clear in my mind about the different formats that can be returned
    by EnvUserId, nor how the fields in the UserID map onto the format
    expected by AddressBookResolveFullName.
    So, Id greatly appreciated answers to the following questions:
    1. Why does AddressBookResolveFullName fail when I use the name as it
    appears in the "from" text box?
    2. Why does the name in the "from" text box not match the name format
    defined by the address book? After all, any name I enter in the "To" field
    must be in the correct format.
    3. Is there any way of converting a name from "FirstName LastName" to
    "LastName, FirstName" other than writing code to parse the name for a
    comma and switching the names myself? To have to do this seems to me like
    asking for trouble.
    4. Can I use the UserID returned from EnvUserId when executing
    AddressBookGetFullName?
    5. Will the name returned by AddressBookGetFullName be in "LastName,
    FirstName" format?
    6. Or am I missing a much simpler solution to this problem?!
    Thanks in advance,
    Phil.

    [email protected] (magicmonkeyjuice) wrote in
    news:[email protected]:
    > Hi,
    >
    > I'm having some problems in GroupWise 6 which I'd appreciate some help
    > with.
    >
    > I'm trying to search an address book for an email address based on the
    > "from" name in a newly created email, where the address book name
    > format is "LastName, FirstName". I've tried a number of approaches,
    > none of which seems to work, as I shall describe below.
    >
    > 1. I get the displayed name in the "from" textbox of the mail by
    > executing ItemGetText. Now, regardless of the address book name
    > format, the name I receive is in the format "FirstName LastName" (eg
    > "Dave Smith"). When I then execute AddressBookResolveFullName on this
    > display name, I am returned "Token Execution Failed" presumably
    > because the address book lookup is expecting a name in the format
    > "Smith, Dave" (incidentally, the same code works fine when the address
    > book name format is set to "FirstName LastName").
    >
    > 2. As an alternative approach, I get the current UserID by executing
    > EnvUserId. This gives me a UserId in a format such as
    > [email protected]. I then execute AddressBookGetFullName in
    > the expectation of being given the display name (hopefully in
    > "LastName, FirstName format"), which I could then use in executing
    > AddressBookResolveFullName. However, AddressBookGetFullName also
    > returns "TokenExecutionFailed". This may be due to the format of the
    > UserID I am using not matching what is expected by
    > AddressBookGetFullName. I'm not entirely clear in my mind about the
    > different formats that can be returned by EnvUserId, nor how the
    > fields in the UserID map onto the format expected by
    > AddressBookResolveFullName.
    >
    > So, Id greatly appreciated answers to the following questions:
    >
    > 1. Why does AddressBookResolveFullName fail when I use the name as it
    > appears in the "from" text box?
    >
    > 2. Why does the name in the "from" text box not match the name format
    > defined by the address book? After all, any name I enter in the "To"
    > field must be in the correct format.
    >
    > 3. Is there any way of converting a name from "FirstName LastName" to
    > "LastName, FirstName" other than writing code to parse the name for a
    > comma and switching the names myself? To have to do this seems to me
    > like asking for trouble.
    >
    > 4. Can I use the UserID returned from EnvUserId when executing
    > AddressBookGetFullName?
    >
    > 5. Will the name returned by AddressBookGetFullName be in "LastName,
    > FirstName" format?
    >
    > 6. Or am I missing a much simpler solution to this problem?!
    >
    > Thanks in advance,
    >
    > Phil.
    >
    >
    >
    I'm sorry to say that I have never made this work and have always
    recreated the email address. For some reason, getting the email address
    out of GW requires hitting the directory, and not the GW database with
    any exposed API
    Regards,
    Michael Risch
    Developer SysOp 3

  • Address book color coding?

    I have one of those, "I WANT THE WORLD of SUPER APPLICATIONS ON MY MAC" type of questions regarding names in my address book.
    I have a large address book and use smart groups and such to send out group emails to people I have selected to drop into those folders. no problem.
    However there are sometimes that I only want to send an email to particular people in those larger folders, as well as others from other groups, but never the same combinations due to the subject nature of their emails. Rather than to create several combinations of email groups (about 15 or so) it would be great if there was a way I can color code what main group these people are located in.
    So I guess my question (and I hope the answer is YES) is: Is there any way to color code each name in the address book, like you can color code files with the different colors so I can easily pick out who is a red address (business associate type 2) and who is a yellow address (business associate type 4) etc. out of my master list instead of having to take the time to go through each smart group folder individually.
    Sometimes it is far faster to simply go down my main list of addresses instead of the blocks and then go back in and delete who I do not want to send to.
    It would make what I use my address book for a lot faster if I only had to scan my master list and see who is red, yellow, purple, or nothing etc and select them that way.
    Thanks

    Well the short answer is no.
    However, are you aware that one contact can be a member of several groups? And that a group can be a member of a group? If that doesn't give you the flexibility to do what you want, consider adding keywords in the notes fields. Type one of the keywords in the search box and you can select all the matches and drag them to a To or a Bcc field ...
    AK

  • Want to Emails from Yahoo/Hotmail/Gmail address book

    Hi,
    I saw 2-3 threads of similar requirement, but no one has replied it.
    It is possible to do it because some paid sites selling this code.
    Any one can tell me that how this is possible?
    Please help me.

    Yes,
    I want to import emailids from Yahoo/Hotmail/Gmail address books by giving their userids and passwords.
    (Like http://www.vastal.com/my_imports/)
    Some sites are selling this code developed in JAVA so it is possible to do it in JAVA.
    If you have any solution then please help me.
    Thanks,
    Rakesh

  • Fetching address book from yahoomail,gmail,hotmail...

    Hi ALL,
    I am going to develop the java project which has some additional services.One of the service is to fetch the address book of Gmail,HotMail,YahooMail.For that i dont know how to start.Can anyone provide me an idea for doing this task.
    If you provide sample code for fetching addres book of any one public services(yahoo,hotmail) is very helpfull to me.I am in very tough situation.Please give your solution as soon as possible.
    Thanks,
    Sourab

    Can any one say me how to set proxy server settings, i need to pass ProxyHost,port,System username,password.
    my code below, it is throwing above exception, Please any one help to rectify problem
    package javaTest;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Properties;
    import javax.mail.Session;
    import com.xdatasystem.contactsimporter.Contact;
    import com.xdatasystem.contactsimporter.ContactListImporter;
    import com.xdatasystem.contactsimporter.ContactListImporterFactory;
    public class test {     
         public static void main(String[] args) throws Exception {
              // TODO Auto-generated method stub          
              Properties systemSettings = System.getProperties();
              systemSettings.put("http.proxyHost", "10.9.32.3");
              systemSettings.put("http.proxyPort", "3128");
              System.setProperties(systemSettings);
              SMTPAuthenticator auth = new SMTPAuthenticator();
              auth.getPasswordAuthentication();     
              ContactListImporter importer=ContactListImporterFactory.guess("[email protected]", "urslovingly");
              List contacts=importer.getContactList();
              Iterator itr=contacts.iterator();
              while(itr.hasNext())
                   Contact c=(Contact)itr.next();
              System.out.println("name: "+c.getName()+", email: "+c.getEmail());
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SMTPAuthenticator extends Authenticator {
         public PasswordAuthentication getPasswordAuthentication() {
              String username = null;
              String password = null;
              try {
                   username = "hari.prasad";
                   password = "venkateswara";
              } catch (Exception e) {
                   e.printStackTrace();
              return new PasswordAuthentication(username, password);
    }

  • Access yahoo, hotmail, gmail address book from Servlet

    Has anyone done this before? I need to be able to do this from my application passing a username and password to these email sites. Thanks.

    Yes,
    I want to import emailids from Yahoo/Hotmail/Gmail address books by giving their userids and passwords.
    (Like http://www.vastal.com/my_imports/)
    Some sites are selling this code developed in JAVA so it is possible to do it in JAVA.
    If you have any solution then please help me.
    Thanks,
    Rakesh

  • Address book application in java using jdbc to connect to mySQL server

    hi there .....
    as clear from the topic i want to make an address book.....as above
    this is my first ever proper application of java
    i have this plan
    class GUI{* contains all components */}
    class links_GUI_to_db{* contains business logic simple enough from name */}
    then i make objects of both classes in "Main" class and all processes are done there
    as i am totally new to this thing , i would like some advice and an initial guideline on how to proceed
    i am NOT ASKING for code but advice on interaction of classes and how to proceed intitially
    thanks

    Hi,
    The answer depends pretty much on how ambitious you are, and several articels and books can be written on the topic, so it's unfortunately not something that can be fully answered in a short post.
    My best advice is that you google on MVC and on how to create layered applications. You can after that start reading e.g. JDBC tutorials and Swing tutorials (if that is the UI that you are going to use).
    Kaj
    Ps. I would probably not use MySQL as database for an address book. I would instead use a database that doesn't require installation. E.g. H2 or Derby.

Maybe you are looking for