How To Close a TerminalIO Program

Hi,
I realise this is an incredibly stupid question, but what is the most graceful way of closing a TerminalIO program? I have to write the close in a seperate method to the main method.
Thanks,
Luke.

System.exit(0);

Similar Messages

  • How to close other Windows Programs from a Swing GUI ?

    I am making this really simple login program that once a user has successfully entered a username and password, and this is checked through a mySQL database , I run an Internet Explorer Windows.
    Now I am trying to setup a logout button and when they push this button ideally the open Internet Exlporer Windows would close.
    Does anyone have an idea how to do this is Swing or the wider java language or maybe even something built into windows ?
    S.

    It's as simple as obtaining references to the Windows and calling dispose() on them. How you obtain the references is entirely up to you. For example, you can create a List to hold all the children windows/dialogs that are created. And on logout you iterate through the list, dispose the child windows, and remove them from the list. Or maybe the child windows can add themselves as listeners to the logout button. When it's clicked and an ActionEvent is fired, the child windows can dispose of themselves automatically.

  • How to close external programs?

    Hi there,
    in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
    start external programs. But how to  close external programs when
    they finished its work? Is there a vbs-command for it? Is there a way
    when calling "cmd.exe" with a proper parameter?
    Martin Bohm

    Hello Martin!
    Yes, with the tool 'tasklist' in the same directory.
    The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
    If IsDIAdemRunning() Then
    Call MsgBox( "At least one DIAdem is running!" )
    Else
    Call MsgBox( "No DIAdem at all!" )
    End If
    Function IsDIAdemRunning()
    Dim oWshShell
    Dim oExec
    ' Execute via Shell Object
    Set oWshShell = CreateObject("WScript.Shell")
    Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
    ' wait until tasklist is finished
    Do While oExec.Status = 0
    Pause(1)
    Loop
    ' no Standard Output -> no DIAdem running
    IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
    End Function
    A better solution might be possible via WMI.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • How to close Internet Explorer and other programs running on Windows?

    In order for Flash Player to be installed or updated, any programs that use Flash Player must be closed.  This includes Internet Explorer or other browsers, instant messengers, Skype, etc.
    These programs may be running in the background, not as visible windows, but need to be closed anyway.
    To close such programs use the Windows Task Manager.  To start Task Manager, take any of the following actions:
    Press CTRL+ALT+DELETE, and then click Task Manager.
    Press CTRL+SHIFT+ESC.
    Right-click an empty area of the taskbar, and then click Task Manager.
    Once the Task Manager is running, select the Processes tab.  On older Windows version you may need to click on the Process Name or Image Name header to sort the process names.
    Now right-click on every process that the Flash Player installer needs to close (e.g. iexplore.exe), then select End Process.
    It would be desirable if the Flash Player installer could perform that action by itself; I have therefore created an enhancement request.  If you were affected by this problem, please head over to the Bugbase and vote for this request: https://bugbase.adobe.com/index.cfm?event=bug&id=3548136

    See How to close Internet Explorer and other programs running on Windows?

  • How to close running program?

    Is there a way to close a program in Windows if I know the loaded exe name? How is this done?
    There is a program called kill.exe from the NT resource kit. It's used as "kill.exe processname". I'd like to use something similar but through a Java object.
    Thanks,
    Brett

    You can close only those programs which you run through your java program. e.g. you can run a batch file through your java program as follows:
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec("c:\\my.bat");
    Now you have a reference of your created program. At any time you can close it as follows:
    process.destroy();

  • Please do the following: -Close any running programs -Empty your temporary folder -Check your internet connection (Internet-based Setups) Then try to run setup again. Error code -6003. How do I empty temporary folder?. Thanks. Allan

    I am having a problem installing Nikon Codec, software to view photos and get this error error message: Setup has experienced an error. Please do the following: -Close any running programs -Empty your temporary folder -Check your internet connection (Internet-based Setups) Then try to run setup again. Error code -6003. How do I empty temporary folder?. Thanks. Allan

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    *http://support.mozilla.com/kb/Deleting+cookies
    *http://support.mozilla.com/kb/How+to+clear+the+cache

  • How can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.

    how can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.

    isaackito wrote:
    how can i refresh the mail, to see the latest email received from my hotmail account. If i close Mail, the program, and re-open, then I can see the latest mail received. Is there a key combo-short-cut to do this.
    Mailbox menu>Get New Mail:

  • Says please close the following programs to continue. listed is toolbar. How do I close "toolbar"

    says please close the following programs to continue. listed is toolbar. How do I close &quot;toolbar&quot; to get the program to proceed?
    There is no IE open either

    See How to close Internet Explorer and other programs running on Windows?

  • How to close open programs

    When you double click the home button, how do close the open application?

    Double tap the Home button, then swipe upwards on the App Preview (not the App Icon)

  • How to close my program windows?

    Hey
    One thing I have noticed about apple computers is that you don't just X your programs out, you need to click the program up on the left and click "Close Safari" for example or they don't close correctly, or do they? Because when I just x out my programs / applications I don't know if my macbook closes them? I'm also wondering, if you could x them out, there wouldn't be no option to need to close them which apple computers offer, or by also pressing CMD (Command) plus Q. So I'm just wondering, is it enough by just x'ing or what's this deal about
    Thanks in advance

    Matthew Shamounnia wrote:
    One thing I have noticed about apple computers is that you don't just X your programs out, you need to click the program up on the left and click "Close Safari" for example or they don't close correctly, or do they? Because when I just x out my programs / applications I don't know if my macbook closes them?
    What you are running into is a basic difference between Macs and Windows. In Windows, every application is contained in an enclosing window with its own menu bar. Inside that are the document windows. When you click the X in the enclosing window, you X-out the entire application and it quits. You can also click X in document windows to close them without closing the entire application, but you can always be sure the clicking the X on the application window will always close the application.
    In OS X the enclosing window is optional. This leads to a lot of confusion with new users because of the inconsistency in the user interface. In OS X, some apps use an enclosing window like iPhoto. If you mouse over the red button you see an X, if you click that it works like Windows where the program quits. But some applications like TextEdit do not have an enclosing window so if you click the red button/X you are only closing a window, and the application stays open.
    In general, if it is a single-window application, clicking the red X button closes the entire program; if it is a multiple-window program you must use the Quit command instead. But this is still confusing because you may not have advance knowledge of whether an application is single or multiple window. The user experience on Windows is a bit more consistent in this area.
    To keep things simple on the Mac, it's best to not try and figure out what kind of program it is, forget about whether you should be clicking this or that, and instead just use File/Quit or command-Q to close an app because that works every time.

  • Everytime I try to open a creative cloud product, the program closes. I need to use both illustrator and indesign for school and I was wondering if anyone had any advice on how to actually make the program work?

    If anyone has any advice on how to make creative cloud programs work please let me know!
    Any help is appreciated.

    These questions below may be for a different product... but the KIND of information you need to supply is the same, for the products you use
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840

  • How do i stop my programs from automatically popping up when i turn on the computer?

    how do i stop my programs from automatically popping up when i turn on the computer?

    When you log out or shut down, there will be a checkbox that asks you if you want to reopen windows when you log in. Just uncheck this box. If that isn't it, you may have login items turned on. Go to System Preferences>Users and Groups and then under your name click the Login Itens tab. Make sure nothing is there.
    If you want to stop windows from restoring when you open applications (so for example when you open Safari it doesn't open the 50 tab page you just had open when you quit) go to SystemPreferences>General and then hit the checkbox that says Close windows when quitting an application.

  • How to close the adobe forms in popup windows once.

    hi,expert..
    i show a adobe form in a popup windows in my webdynpro program...but i find out that i at least click twice on the "CLOSE" button on the right top of the window.....how can i modify my program to  close the window once..
    the original codes are as follow:
    method onactionprint .
       data lo_nd_zhrhap_vp_app_01 type ref to if_wd_context_node.
      data lo_nd_zhrhap_t_document type ref to if_wd_context_node.
      data lt_zhrhap_t_document type wd_this->elements_zhrhap_t_document.
      lo_nd_zhrhap_vp_app_01 = wd_context->get_child_node( name =
    wd_this->wdctx_zhrhap_vp_app_01 ).
      lo_nd_zhrhap_t_document = lo_nd_zhrhap_vp_app_01->get_child_node(
    name = wd_this->wdctx_zhrhap_t_document ).
      lo_nd_zhrhap_t_document->get_static_attributes_table(
        importing
          table = lt_zhrhap_t_document ).
    DATA lo_nd_zhrhap_s_app_leader TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_app_leader TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_app_leader type
    wd_this->element_zhrhap_s_app_leader.
    lo_nd_zhrhap_s_app_leader = lo_nd_zhrhap_vp_app_01->get_child_node(
    *name = wd_this->wdctx_zhrhap_s_app_leader ).
    lo_el_zhrhap_s_app_leader = lo_nd_zhrhap_s_app_leader->get_element(
    lo_el_zhrhap_s_app_leader->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_app_leader ).
    DATA lo_nd_zhrhap_s_dates TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_dates TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_dates type wd_this->element_zhrhap_s_dates.
    lo_nd_zhrhap_s_dates = lo_nd_zhrhap_vp_app_01->get_child_node( name
    *= wd_this->wdctx_zhrhap_s_dates ).
    lo_el_zhrhap_s_dates = lo_nd_zhrhap_s_dates->get_element(  ).
    lo_el_zhrhap_s_dates->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_dates ).
    采集表名称和日期
      data lo_nd_if_data type ref to if_wd_context_node.
      data lo_el_if_data type ref to if_wd_context_element.
      data ls_if_data type wd_this->element_if_data.
      lo_nd_if_data = wd_context->get_child_node( name =
    wd_this->wdctx_if_data ).
      lo_el_if_data = lo_nd_if_data->get_element(  ).
      lo_el_if_data->get_static_attributes(
        importing
          static_attributes = ls_if_data ).
      ls_zhrhap_s_dates-valid_begda = ls_if_data-begda.
      ls_zhrhap_s_dates-valid_endda = ls_if_data-endda.
    DATA lo_el_zhrhap_vp_app_01 TYPE REF TO if_wd_context_element.
       data ls_zhrhap_vp_app_01 type wd_this->element_zhrhap_vp_app_01.
       data lv_description like ls_zhrhap_vp_app_01-description.
    lo_el_zhrhap_vp_app_01 = lo_nd_zhrhap_vp_app_01->get_element(  ).
    lo_el_zhrhap_vp_app_01->get_attribute(
       EXPORTING
         name =  `DESCRIPTION`
       IMPORTING
         value = lv_description ).
    REPLACE ALL OCCURRENCES OF '类别:' in lv_description with ''.
      lv_description = ls_if_data-stext.
      data l_is_ok    type boole_d.
      data pdf_source type xstring.
      data l_msg      type ref to cl_hrpa_message_list.
      create object l_msg.
      call method zcl_hr_appraisal_utility=>print_contract_direct
        exporting
        form_type           = 'COD'
          zhrhap_t_document   = lt_zhrhap_t_document
          zhrhap_s_dates      = ls_zhrhap_s_dates
          zhrhap_s_app_leader = ls_zhrhap_s_app_leader
          description         = lv_description
        job_description     =
          message_handler     = l_msg
         importing
          is_ok               = l_is_ok
          pdf_xstring         = pdf_source
      check l_is_ok is not initial and pdf_source is not initial.
      data lo_nd_pdf type ref to if_wd_context_node.
      data lo_el_pdf type ref to if_wd_context_element.
      data ls_pdf type wd_this->element_pdf.
      data lv_source like ls_pdf-source.
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
      lo_el_pdf = lo_nd_pdf->get_element(  ).
      lo_el_pdf->set_attribute(
        exporting
          name =  `SOURCE`
          value = pdf_source ).
    *-->ADOBE View embeded to ViewContainer UI
      data: lr_view               type ref to if_wd_view_controller,
            lr_api_main           type ref to if_wd_component,
            lr_window_man         type ref to if_wd_window_manager,
            comp_usage            type ref to if_wd_component_usage,
            l_title               type string value '打印合同',
            lr_window             type ref to if_wd_window.
      lr_view = wd_this->wd_get_api( ).
      lr_api_main = wd_comp_controller->wd_get_api( ).
      lr_window_man = lr_api_main->get_window_manager( ).
    l_title = wd_colr_mp_controller->model->get_text( '006' ).
      call method lr_window_man->create_window
        exporting
          modal        = abap_true
          window_name  = 'POPUP'
          title        = l_title
          button_kind  = if_wd_window=>co_buttons_yesno
         message_type = if_wd_window=>co_msg_type_none
          default_button = if_wd_window=>co_button_yes
        receiving
          window       = lr_window.
      lr_window->open( ).
    endmethod.
    looking forward to your help....thanks in advance

    Ping,
    1st, see the Markup formatting options over on the right part of the screen - if you wrap your code between the code tags it will read MUCH better.
    2nd, I can't replicate this issue - we have several PDFs opening in new windows & we only need to click once on the clost 'X' - how are you calling the PDF in a new window?
    If you can't find a final resolution, an alternative would be to place a LinktoAction on your web dynpro application somewhere that makes sense which would close the window for you.
    We do this on Sucess Message Views...
    You can simply add the link to action to the screen, and in the event handler use
       data : l_view_cntr type ref to if_wd_view_controller,
           l_win_cntr  type ref to if_wd_window_controller,
           l_window    type ref to if_wd_window,
           l_parameter_list  type wdr_event_parameter_list,
           l_parameter       type   wdr_event_parameter,
           l_val type ref to data.
    field-symbols <fs> type any.
    l_view_cntr = wd_this->wd_get_api( ).
    l_win_cntr  = l_view_cntr->get_embedding_window_ctlr( ).
    l_parameter-name = 'CLOSE_WINDOW'.
    create data l_val type c.
    assign l_val->* to <fs>.
    <fs> = 'X'.
    l_parameter-value = l_val.
    insert l_parameter into table l_parameter_list.
    l_win_cntr->if_wd_view_controller~fire_plug(
    exporting plug_name = 'EXIT_PLUG'
               parameters = l_parameter_list ).
    Make sure you have an Exit plug on your Window with Plug Type EXIT.

  • How to close open subvi's in the beginning of running the main vi.

    Hello,
    I've got a pretty large application that is dependant on several subvi's.
    I'm searching for a way to close the subvi's when I start running my main application.
    All these subvi's need to be closed during the initialisation phase of my main application. (before it is doing its main task.)
    I know it is possible to ask for the VI's in memory for my LabVIEW application, but I don't know how to close a subvi programmatically. (unload it from memory)
    What I want to do is check for a list of open subvi's in the beginning of my main application. (only a limited set of subvi's)
    If one of the subvi's is indeed open I want to close it (unload it) and then start doing my thing from within the main application.
    Note: The subvi's need to be closed so that I can load them dynamically later in the program. If one of the subvi's is open and I start running my main application I get an incorrect behaviour.
    Thx for the help!
    Message Edited by noxus on 11-14-2006 08:07 AM

    Noxus,
    I programmed a small example.
    If you have further questions do not hesitate to come back...
    BR,
    ThSa
    (Additonally I added the screenshot in term of that you do not have LV 8.20)
    http://www.newgistics.com
    Attachments:
    VI_Server_LV820.zip ‏12 KB

  • How To Close Documents Without Closing Entire App

    Since the latest Pages update, when I close all open documents, it automatically closes the entire program and then I have to wait 15 minutes to start it back up. Is there any setting I can change to fix this?

    That is just how long it takes the app to open up, give or take.
    Version 5.1
    Sometimes on my hard drive, sometimes to Apple's cloud, it has the same problem either way.

Maybe you are looking for