Closing programs thru runtime?

Hi all,
i've written a program that fires up RealPlayer using the runtime command RunTime.exec(program location). Works fine and all. Now i want to be able to close RealPlayer from within my program. This doesn't seem so obvious. I'm using it within the windows environment and the program isn't platform independant anyway so suggestions relating to shutting down within windows are fine.
Any suggestions woul be most appeciated,
Neil

Unfortunately, that kills the process but not any programs that may have been started during that processes lifetime. Thanks for the response!
Neil

Similar Messages

  • Updating date and time after closing notification thru FM 'STATUS_UPDATE'.

    Friends,
    My requirement is to update certain closed notification.
    Before opening a closed notification, the field QMDAB and QMZAB ( Closing date and closing time ) are present in the table QMEL with some values.
    Now i open this closed document thru my program, by updating values in JEST table, then change the notification thru another function module, and then close it again by reverting the changes done in JEST table.
    I am using the function module 'STATUS_UPDATE' to make the changes in JEST table.
    Now my problem is, though the notification gets closed after using 'STATUS_UPDATE', the closing date and closing time do not get updated in the database table QMEL. They become blank.
    I am using the function module 'IQS4_GET_NOTIFICATION' and IQS4_MODIFY_NOTIFICATION to make changes in notification.
    Kindly help.

    Hi,
    Your problem is that, after changing the notification status through the function module "STATUS_UPDATE" , field QMDAB and QMZAB ( Closing date and closing time ) are not updated in the table QMEL
    i am also facing the same problem.
    did you get the answerd for your problems ?
    can you please tell me, what you did, to solve your problems.
    can you please share your answer with me?
    you can contact me also if you wish
    duraisamy .  dhanaraj at accenture . com
    Manythanks
    Duraisamy

  • I am working on a windows based program thru Chrome on my Mac. It asked me to cont/alt/delete - how do I get the Mac to respond?

    I am working on a windows based program thru chrome on my mac - how do I control/alt/delete on the mac?

    Control key - Alt (also known as the Option key) and Delete key. However remember Chrome is not an Apple product so if that doesn't work you also might want to seek help on a Google forum that supports Chrome.

  • When I open itunes I get a 'DATA EXECUTION PREVENTION' 'Windows closed program'. Can anybody help please.

    When open iTunes it starts OK then a message from Windows appears, 'DATA EXECUTION PREVENTION Windows closed program'. Then the whole thing shuts down. Does anybody know how to sort this out please. I am using XP operating system and have recently updated iTunes. Thanks

    Hi alanfromharlow,
    It sounds as if iTunes is failing to launch properly on your Windows computer. You don’t mention what version of Windows you have, but one of these two articles should be useful to you -
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    iTunes for Windows XP: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1421
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Sending excel file as an attachment  in email program thru Oracle8i

    I cant send my excel file as an attachment in my email program thru Oracle 8i.
    My excel file i located in my local pc C:\test.xls
    Everything is in my local machine, DB and progams.
    I have read the example of DEMO_MAIL program i am hardly understand it.
    My sample program:
    if (p_file_name is not null) then
    begin_attachment( p_mime_type=>'application/excel',               p_fname=>p_file_name,
         p_transfer_enc=>'base64'
         dbms_lob.createtemporary(l_blob, true);
         dbms_lob.open(l_bfile);
         dbms_lob.fileopen(l_bfile);
         dbms_lob.open(l_blob, dbms_lob.lob_readwrite);
         dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
         dbms_lob.fileclose(l_bfile);
         dbms_lob.close(l_bfile);
         l_file_len := dbms_lob.getlength(l_blob);
         l_modulo := mod(l_file_len,MAX_BASE64_LINE_WIDTH);
         l_pieces := trunc(l_file_len/MAX_BASE64_LINE_WIDTH);
    while (l_counter < l_pieces)
    loop
    dbms_lob.read(l_blob, l_modulo, l_filepos, l_buffer);
    l_message := utl_raw.concat(l_message, l_buffer);
    write_mb_text(l_message||g_crlf);
    l_filepos := l_counter * MAX_BASE64_LINE_WIDTH + 1;
    l_counter := l_counter + 1;
    end loop;
    if l_modulo <> 0 then
    dbms_lob.read(l_blob, l_modulo, l_filepos, l_buffer);
    l_message := utl_raw.concat(l_message, l_buffer);
    write_mb_text(l_message||g_crlf);
    end if;
    dbms_lob.close(l_blob);
    end_attachment(true);     
    Please help

    I did not receive any error messages when executing the program. It works fine, I received the email nicely but without the attachment.
    Here is the emails I received:
    LOGICAL SPACE USED HAS REACHED ITS TRESHOLD. PLEASE DO NECESSAY TO MAKE MORE ROOM FOR THE SPACE TO EXTEND.
    Tablespace Name Used Size(MB) Free Size(MB)
    SYSTEM 259.953 4.047
    USERS 144.508 55.492
    INDX 31.258 26.742
    -------7D81B75CCC90D2974F7A1CBD
    Content-Type: multipart/mixed; boundary="-----7D81B75CCC90D2974F7A1CBD"
    Content-Disposition: attachment; filename="capacity_13-JAN-05-111226.xls"
    Content-Transfer-Encoding: base64
    -haris

  • Launch many java programs at runtime

    Hi i got one question.
    i have a list of java program ina file.
    i read this file and get each program names.
    i would like to launch all java programs at Runtime from my main Java application.
    here is my code so far:
    String fileName = expansion + ".txt";
              try
                   File file = new File(fileName);
                   FileReader     fileReader= new FileReader(file);
                   BufferedReader bufferReader = new BufferedReader(fileReader);
                   while((program=bufferReader.readLine())!= null)
                        Runtime launch=Runtime.getRuntime();
                        System.out.println("I launch "+ program);
                        launch.exec("cmd.exe /c start /c cd /bin");
                        launch.exec("java "+program);
    this does not work. How can i handle this?
    thank you
    seb

    while((program==bufferReader.readLine())
    != null) {Sorry, I meant
    while((program==bufferReader.readLine())!= null) {{=^)                                                                                                                                                                                                                                                                                                                                                                   

  • MacBook Pro is operating more and more slowly in opening and closing, opening and closing programs and accessing and closing from mobile broadband.  Is there a solution to this problem?

    MacBook Pro is operating more and more slowly in opening and closing, opening and closing programs and accessing and closing from mobile broadband.  Is there a solution to this problem?

    Did you try rebooting?

  • Closing JFrame from within frame without closing program

    Is there any way to close a JFrame from within frame without closing the program. I don't want to just frame.setVisible(false);

    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=%2Bforum%3A31&qt=closing+JFrame+from+within+frame+without+closing+program+&x=5&y=11
    Happy New Year!

  • My ipad is randomly starting and closing programs.

    My Ipad is not responding to touch commands on key board.  It is also starting and closing programs randomly.  What can I do to correct this?

    Tryb a reset, hold power and home button for 15-20 seconds until the apple logo appears.
    No data will be lost.

  • Execute an external program using Runtime class

    How to execute an external java program using Runtime class?
    I have used ,
    Process p=Runtime.getRuntime().exec("c:/j2sdk1.4.0/bin/helloworld.java ");
    But it throws a runtime IOException error:2 or error:123.
    Help me with the code. Thanks in advance.

    Create Runtime Object and attach to system process.Try this code
    import java.io.*;
    public class ExecuteExternalApp {
      public static void main(String args[]) {
                try {
                    Runtime rt = Runtime.getRuntime();
                    //Process pr = rt.exec("cmd /c dir");
                    Process pr = rt.exec("c:\\ yamessenger.exe"); //give a valid exe file
                    BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                    String val=null;
                    while((val=input.readLine()) != null) {
                        System.out.println(val);
                    int exit = pr.waitFor();
                    System.out.println("Exited with error code "+exit);
                } catch(Exception e) {
                    System.out.println(e.toString());
                    e.printStackTrace();
    }Edited by: anishtomas on Feb 3, 2009 9:34 PM
    Edited by: anishtomas on Feb 3, 2009 9:37 PM

  • How do you save battery life by closing programs under i0S7?

    How do you save battery life by closing programs under 0S7?  You used to click the home button twice, but now, since the update of 0S7, this feature seems to be gone.

    click the home button twice, when you see the apps line up on the page, swipe the ones you want to close up and off the page. Scroll to access more apps, tap the home button once to exit the mode
    For battery issues, look in the notifications. iOS7 defaults a lot on that you may not need. Also look to the background updating of apps. That can drain battery too.

  • Problems running program using Runtime.exec()

    Hello everyone. I have a quick problem that perhaps someone can help me with... I'm trying to write a frontend for a command line program. I've found plenty of examples for using exec() to launch this program but I can't quite get the effect that I desire. The program itself launches it's own window (using a graphics library called SDL) but the user interacts with the program through the command prompt.
    The problem that I'm having is that my InputStream thread does not seem to execute until I close the SDL window. I've tried about 10 different combinations of threading this application but nothing seems to work.
    Below I've attached some sample code that I found here on the Sun site... The code does as I described before, the InputStream does not display any text until I close the SDL window.
    Can anyone help out?
    import java.io.*;
    // class StreamGobbler omitted for brevity
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    OutputStream os;
    StreamGobbler(InputStream is, String type)
    this(is, type, null);
    StreamGobbler(InputStream is, String type, OutputStream redirect)
    this.is = is;
    this.type = type;
    this.os = redirect;
    public void run()
    try
    PrintWriter pw = null;
    if (os != null)
    pw = new PrintWriter(os);
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    if (pw != null)
    pw.println(line);
    System.out.println(type + ">" + line);
    if (pw != null)
    pw.flush();
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class TestExec
    public static void main(String args[])
    if (args.length < 1)
    System.out.println("USAGE: java TestExec \"cmd\"");
    System.exit(1);
    try
    String cmd = args[0];
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();

    I'm pretty sure, because if you run the application without any parameters you don't get the SDL window, you just get a list of possible command line switches, that part works fine... It just seems that when the SDL window is open, the thread won't grab and display the individual lines until that window is closed, which will not work for my purposes...

  • Running curl command from a java program using Runtime.getRuntime.exec

    for some reason my curl command does not run when I run it from within my java program and errors out with "https protocol not supported". This same curl command however runs fine from any directory on my red hat linux system.
    To debug the problem, I printed my curl command from the java program before calling Runtime.getRuntime.exec command and then used this o/p to run from the command line and it runs fine.
    I am not using libcurl or anything else, I am running a simple curl command as a command line utility from inside a Java program.
    Any ideas on why this might be happening?

    thanks a lot for your response. The reason why I am using curl is because I need to use certificates and keys to gain access to the internal server. So I use curl "<url> --cert <path to the certificate>" --key "<path to the key>". If you don't mid could you please tell me which version of curl you are using.
    I am using 7.15 in my system.
    Below is the code which errors out.
    public int execCurlCmd(String command)
              String s = null;
              try {
                  // run the Unix "ps -ef" command
                     Process p = Runtime.getRuntime().exec(command);
                     BufferedReader stdInput = new BufferedReader(new
                          InputStreamReader(p.getInputStream()));
                     BufferedReader stdError = new BufferedReader(new
                          InputStreamReader(p.getErrorStream()));
                     // read the output from the command
                     System.out.println("Here is the standard output of the command:\n");
                     while ((s = stdInput.readLine()) != null) {
                         System.out.println(s);
                     // read any errors from the attempted command
                     System.out.println("Here is the standard error of the command (if any):\n");
                     while ((s = stdError.readLine()) != null) {
                         System.out.println(s);
                     return(0);
                 catch (IOException e) {
                     System.out.println("exception happened - here's what I know: ");
                     e.printStackTrace();
                     return(-1);
         }

  • Is it possible to unload a program at runtime?

    Hi experts,
    maybe you can help solve the following problem:
    I have a customer program that is calling a sap standard function module several times. The function module is BAPI_BUPA_ADDRESS_ADD. The BAPI works fine when calling it once but I get errors when repeating the call.
    I assume that the error is caused by the fact, that the data of the respective function group is no longer initial after the first call. Of course this would be a programming error. My assumption is approved by a workaround: When I call the function module in a separate work process with "starting new task" I observe no errors.
    Now I wonder if there is a better workaround because starting a new task for each call has the disadvantage of making each call asynchronous - moreover we create many work processes. For example is there a way to unload or refresh a function group at runtime so that the second call is like the first?
    Thanks
    Peter

    Hi Thomas,
    after importing the patch of sap note 1256410 the error "update was terminated", caused by function module BUPA_ADR_WRITE_DOCUMENT due to duplicate entries in table CDPOS, did not appear anymore.
    However calling the function module BAPI_BUPA_ADDRESS_ADD several times destroys the address data of the business partner because the BAPI does not refresh the local address memory. I found out that this can be done with function module BUP_MEMORY_ADDRESS_INIT.
    Thus actually two problems were involved here.
    Peter

  • Someone PLEASE Check The Media Manager Program! RunTime Components Will NOT Download Properly!

    I am a Verizon FiOS subscriber, and my family members have Verizon apps and programs on their computers.  For some ungodly reason, Media Manager does NOT install properly once the initial download program is acquired.  There is a message that comes up that says "Media Manger installer is having a problem accessing the server to download RunTime components. Please try again later."  I've had my brother call because he is the most technically inclined, and despite being on the phone extensively with Verizon representatives, NO-ONE has fixed or seems to be able to fix this problem!
    I would appreciate it if someone would please either fix the files at the server, fix the downloader so that it goes to whatever new area where the runtime components are, or post the correct link to perhaps a full installer of Verizon MediaManager.  It is very frustrating that despite calling, I have not gotten ANY proper assistance with this issue!
    Sincerely,
    LorraineBMoses
    {edited for privacy}

    What OS are you running?
    If Vista or Windows 7, Try right clicking the install program and selecting run as administrator. See if that helps.

Maybe you are looking for