Need java code to make MySql Dump?

Do anybody know how to write java code to make MySql Dump. I am badly need of this code very urgently!, do any body here to help me!
Kindly help me out.

Urgency means two things:
- either your homework is late (do it yourself)
- or you have a deadline on your job (ask a co-worker)
Both isn't really making me want to answer your question. Your time isn't more valuable than that of the others.
And the big question is probably not "how to write the Java code" but "how to make a MySQL dump", Java or not. RTFM for that, and then use either MySQL or Runtime.exec.

Similar Messages

  • I Need Java code for following Algorithm

    * I Need Java code for following algorithm. Kindly any one help.
    1. Read the contents (ideas and its corresponding scores) from two files named as 'a' and 'b'.
    2. Stored the file 'a' contents in array a[].
    3. Stored the file 'b' contents in array b[].
    4. compare both files like
    if(a.equals(b[j])
    Writing the common idea and add the score from file 'a' and 'b'.
    else
    write the uncommon idea and its score..
    For example :
    Form Agents.txt
    action,65
    architecture,85
    eco-,15
    essay,30
    form,85
    form,85
    link,40
    tangent,25
    Form Agents1.txt
    Black holes,69
    essay,78
    Herewith i have above mentioned two files named as Form Agents and Form Agents1.
    Form Agents has eight fields
    Form Agents1 has two fields
    --> 'essay' is common in two files, so store the idea 'essay' and add the score from Form Agents score is '30' and Form Agents1 has 78 (essay 108).
    Finally it stores idea in another file with uncommon fields also.
    Please help us.

    We have tried with following code.
    But we cant add the scores.
    For Example:
    Form Agents.txt --> has "essay,30"
    Form Agents1.txt --> has "essay,78"
    Result is: essay,108
    Finally it stores idea in another file with uncommon fields also.
    So Any one pls correct the following code.
    try
    DataOutputStream o1=new DataOutputStream(new
    FileOutputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\CandidateResponses\\Form
    Agents.txt"));
    //Reading the contents of the files
    BufferedReader br= new BufferedReader(new InputStreamReader(new
    FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\Ideological\\Form
    Agents.txt")));
    BufferedReader br1= new BufferedReader(new InputStreamReader(new
    FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
    World\\Project\\Material\\art\\System Agents\\Form Agents\\Related\\Form
    Agents.txt")));
    while((s=br.readLine())!=null)
    s1+=s+"\n";
    while((s2=br1.readLine())!=null)
    s3+=s2+"\n";
    int numTokens = 0;
    StringTokenizer st = new StringTokenizer(s1);
    String[] a = new String[10000];
    String[] br_n=new String[10000];
    int i=0;
    while (st.hasMoreTokens())
    s2 = st.nextToken();
    a=s2.substring(0,s2.length()-3);
    s6=s2.substring(s2.length()-2);
    br_n[i]=s6;
    i++;
    numTokens++;
    int numTokens1 = 0;
    StringTokenizer st1 = new StringTokenizer (s3);
    String[] b = new String[10000];
    String[] br1_n=new String[1000];
    int j=0;
    while (st1.hasMoreTokens())
    s4 = st1.nextToken();
    b[j]=s4.substring(0,s4.length()-3);
    s7=s4.substring(s4.length()-2);
    br1_n[j]=s7;
    j++;
    numTokens1++;
    int x=0;
    for(int m=0;m<a.length;m++)
    for(int n=0;n<b.length;n++)
    if(a[m].equalsIgnoreCase(b[n])){
    int sc=Integer.parseInt(br_n[m]);
         int sc1=Integer.parseInt(br1_n[n]);
    int score=sc+sc1;
         o.writeBytes(a[m]+","+score+"\n");
    break;
    else
    o.writeBytes(a[m]+","+br_n[m]+"\n");
    break;
    }catch(Exception e){}

  • I need java code to flatten an image

    Hy! I need java code to flatten an image/sketch...someone can help me? Thanks to everybody!

    http://java.sun.com/developer/technicalArticles/Security/JCE/ ?

  • I need java code for chating application

    i need java code for chating application. plz help me

    GANGINENI wrote:
    i need java code for chating application. plz help meGIYF.
    [http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html|http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html]
    File under: lern2Google

  • Need  java code to perform refresh button action using swings and awt

    i need java code to perform refresh button action using swings and awt.please help me

    Wait ! Noboby ? OK, I'll do it
    public void onBtnAction ()
        if (!fresh)
            refresh ();
    }Seriously, did you expect anyone to answer such a cryptic question ?

  • Need Java Code or Program to compare 2 XML files ???

    Hi All,
    I need Any java code snippet to compare 2 XML files? Please help me..
    Thanks,
    J.Kathir

    Can you explain which possibilities you rejected while searching for that on the Internet? That may give us some insight into your actual requirements.

  • Need JAVA code to create OIM ITresource-connection values are in a csv file

    Hi,
    Could any one plz help me with the java code used / tested before to create OIM IT resource dynamically, for the reference. IT resource parameter (connection) values in a .csv file, where in I've multiple environments.
    Thanks,
    Ramesh
    Edited by: user13267745 on Aug 19, 2010 12:37 AM

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • Java code to make connection to web server??

    Hi,
    we are looking at simple java code to connect to IIS Server and retrive a ZIPed file.
    this zip file contains photos. all individual photos are stored in zip file under doc root of IIS server..
    any sample code will be great

    Here is some code on how to open an URL and read from it.
    url = new URL("http://IIS_server/doc/Yourfile.zip");
    URLConnection conn = url.openConnection();
    conn.setDoInput(true);
    in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    StringBuffer sbResponse = new StringBuffer();
    int intChar = 0;
    while ((intChar = in.read()) !=-1) {
         // got one byte as int from the server do something here to pass the byte from one stream to another (filestream)
         // there is a way to save to the local HD with an applet but you have to sign it and adjust some security policys
    in.close();

  • URGENT : Need java code snippet to retrieve uniquemember values OID 11g API

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

    Hi All,
    We have a requirement to retrieve the uniquemember attribute values using OID 11g API. We are using labeleduri approach for dynamic groups and thus all the uniquemember values are created using dynamic groups.
    When we are trying to retrieve the uniquemember values using Java code snippet, it is not returning the values. The strange thing is: The uniquemember values created using dynamic groups are not visible in ODSM OID console or JExplorer tool. However those values are visible in LDAP Browser v2.8.1 tool.
    So can somebody throw light on this? Any pointers or sample code snippet to retrieve uniquemember values would be grateful.
    Thanks
    Mahendra.

  • I need Java code for a simple graphical hit counter for a webpage

    I was wondering if anybody out there could send me some code for a simple graphical hit counter for a webpage. All the sites that I've visited are garbage and of no use to me. Please help me.
    Colin

    Not as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
    - Applets can't read/write files
    - Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
    In short, no, there is no simple java solution (that I know of).
    Cheers,
    Radish21

  • Need the code to make these to new objects in BW world, please help...

    I have two fields that I get from the source (to DSO):
    CREATE_DATE (YYYYMMDD)
    REPORT_MONTH (YYYYMM)
    First I want to make a infoobjects (called CREATE_MONTH) that takes the YYYYMM from the CREATE_DATE.
    The I also want to make an indicator (called MONTH_IND) that have a test on infoobjects called CREATE_MONTH and REPORT_MONTH.
    The logic should be something like this:
    If CREATE_MONTH is 3 month earlier than REPORT_MONTH the indicator should say ‘over 2 month
    If CREATE_MONTH is 4 month earlier than REPORT_MONTH the indicator should say ‘over 3 month
    Etc….
    Conclution:
    Need two new objects:
    1. CREATE_MONTH
    2. MONTH_IND
    Can someone give me some help on how to do this Please?

    Hi Elaine!
    First of all I´d like to thank your answer.
    I know what you mean; I had a gif animated file in my web site and I converted it in a swf file, that is the reason why I couldn´t do the correct to make the link. I thought that I could make the link with a simple code but thanks to this foro, now I know that it is a bit more complicated.
    Anyway, I think that it is better if I read the tutorial to know how this work.
    Thank you again and have a nice day!
    afp5trip

  • Need Java code for random text.

    To all you Java programmer Gurus out there.
    How hard is it to make a small Java program whose whole purpose is to ask a user how many random characters they want and then proceeds to generate a text file full of RANDOM characters A-Z and a-z ?
    The characters could repeat it does not matter as long as they repeat randomly.
    I've found all kinds of code examples for Random password generators and things like that but none quite do what I want them to do.
    sample of what the output file might look like
    "fdfbgHBukOKiIkolpPkmNytTrFvDsVbNmNHyygrRDeDsSEfFGHGjJkjKKoJH"
    Thank You kindly in Advance

    JasonP wrote:
    To all you Java programmer Gurus out there.
    How hard is it to make a small Java program whose whole purpose is to ask a user how many random characters they want and then proceeds to generate a text file full of RANDOM characters A-Z and a-z ? Not hard, in fact not hard at all.
    Thank You kindly in AdvanceYou're quite welcome!

  • Need ABAP code to make unique hierarchy values - Request prompt help

    hi
    <removed>
    I am new to SAP. Please help me in the following
    I require an ABAP code for the following scenario
    I have a simple hieraarchy. The hierarchy is
    SEG -> fam -> clas -> comm
    The values of the seg , fam, cla, com......all will be charecter values
    But in some cases the values will be NOT_KNOWN
    If the values are NOT_KNOWN i need to change them as NOT_KNOWN_1, NOT_KNOWN_2...like that unique charecter values
    should be replaced for NOT_KNOWN
    Example
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN
    Construction -> equipments -> machinery->NOT_KNOWN
    Computers -> Laptops -> Imported -> NOT_KNOWN
                     -> desktops ->flat monitors -> Indian
                           -> imported                     -> NOT_KNOWN->
    NOT_KNOWN -> baggages
    This should be changed to
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN_1
    Construction -> equipments -> machinery->NOT_KNOWN_2
    Computers -> Laptops -> Imported -> NOT_KNOWN_3
              -> desktops ->flat monitors -> Indian
                              -> imported                         
           -> NOT_KNOWN_4 ->
    NOT_KNOWN_5 -> baggages
    This is to make them unique nodes to upload them in hiereachy
    Data is coming from database tables and i was not supposed to do anything in database and the incomin
    data needs to finetuned like this to update them in cube
    So I like to have some coding which will enable this to work in the start routine
    If start routine is not the right option, where else we can do coding
    <removed>
    Regards
    KC

    data : w_suff_n(8) type n,
             w_suff_c(8).
    loop at data_package.
    if data_package-<fieldval> = 'NOT_KNOWN'.
      w_suff_n = w_suff_n + 1. w_suff_c = w_suff_n.
      shift w_suff_c left deleting leading '0'.
      concatenate data_package-<fieldval> w_suff_c into data_package-<fieldval>.
      modify data_package.
    endif.
    endloop.
    *Change <fieldval> in the above to the actual field name.

  • Need java code to select a folder from the Host server System

    Hi All,
    In my application For a button click i want to select a folder from host server .And copy an image into that selected path. Iam using tomcat 5.0. Can any one tell me how can i do this? Can any one provide sample code for this...
    Thanks in Advance!!!

    Dblr, welcome to the forum.
    When requesting help, you should always include the make/model of the computer and/or monitor. This information is necessary for us to review the specifications of them.  We need to know Windows version you have installed.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Need Java code Help

    Hi All,
    I need your hlep...
    I have a javamapping where it should read the webservice response and transform into the target structure..
    Webservice response is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_WS_Response xmlns:ns1="http://RFC_Lookup/XI">
    <row>
    <ID>001</ID>
    <KEY>Matnr</KEY>
    <VALUE>34567</VALUE>
    </row>
    <row>
    <ID>002</ID>
    <KEY>Matnr</KEY>
    <VALUE>34567</VALUE>
    </row>
    <row>
    <ID>003</ID>
    <KEY>Matn33</KEY>
    <VALUE>34567</VALUE>
    </row>
    </ns1:MT_WS_Response>
    I should read the above structure and output it into a payload string variable ...
    i have declared variables also
    public void execute(InputStream in, OutputStream out)
              try
                   trace.addInfo("Start of Extraction");
                   OutputStream temp = new ByteArrayOutputStream(1024);
                   byte[] buffer = new byte[1024];
                    for (int read = in.read(buffer); read > 0; read = in.read(buffer))
                         temp.write(buffer, 0, read);
                   String Payload = temp.toString();
                   final String STARTTAG = "<row>";
                   final String ENDTAG = "</row>";
                   int Y_FILENAME_START  = Payload.indexOf(STARTTAG);
                   int Y_FILENAME_END = Payload.indexOf(ENDTAG);
                   int spos = Y_FILENAME_START+STARTTAG.length();
                   <b>if ( ( Y_FILENAME_END > spos) && (Y_FILENAME_END > 0 ) )</b>               {
                        Payload = Payload.substring(Y_FILENAME_START+STARTTAG.length() , Y_FILENAME_END);
                        trace.addInfo("Sucessfully Extracted");
    Please suggest whether how can i read multiple rows .. as i am ABAPER i am unable to do it in Java..
    I think the bold one reads only single row ... please suggest for reading multiple rows...
    Thanks and Regards,
    sridhar reddy
    Message was edited by:
            sridhar reddy kondam

    Please tell us what is the expected target structure.
    Also, avoid to treat xml like strings. Use parsing methods (SAX, DOM). It is way easier, and they are mainly the reason why you should use java mappings over ABAP mappings.
    Regards,
    Henrique.

Maybe you are looking for

  • Changing Browser to Album Artist?

    Hello, I've got iTunes 7 on my PC and have a question about Browsing by Album Artist: Can I change the "browser" (turn-on-and-off-able bit at the top of the main song selecty window) to work off "Album artist" instead of/as well as Artist? Just to fi

  • Im trying to get my music from my external hard drive to my itunes and its not working. what should i do?

    i set up my moms new desktop mac a couple of weeks ago and i did the same thing i tried to do on my macbook but its not working, yet it worked on my moms mac. so i dont know what to do. i moved the file from the hard drive to the itunes folder. then

  • Running total of calculated field in pivot

    VERSION: ORACLE 11 TABLE: create table chart_detail ( DIS        NUMBER, BLD_MO VARCHAR2(7), BLD        NUMBER(10), RPLC      NUMBER(10));DATA: insert into chart_detail values (60,'2011-03',0,2); insert into chart_detail values (150,'2011-04',10572,0

  • Considering purchasing Macbook Air.

    Hi there. I am considering purchasing a MacBook Air. I just wanted to get your take on it as I have been hearing some horror stories about it and I am a little concerned. I have heard there are battery issues, overheating, fan troubles. I have also h

  • Problem with Nokia N8 connected to stereo?

    I have a 3.5 to RCA cable to connect my nokia n8 to a stereo system. Problem is when I put a song on the phone it plays too fast on the stereo - not by much but still unpleasant to listen to. If I connect my laptop to the same stereo with the same ca