How to close the command prompt from program

Hi,
I am using Swing. i used System.exit(0) to close my frame when a condition is met. But the command prompt is not closed. How do i close that automatically

@Op.
When was the command prompt opened?
It won't close if it was opened before you started your application, and it won't close if you are executing your application from a bat/cmd-file that doesn't terminate.
Kaj

Similar Messages

  • How to close the command prompt

    Hi,
    I am new to Java. I am using Swing. i used System.exit(0) to close my frame when a condition is met. But the command prompt is not closed. How do i close that automatically

    Answered in your duplicate thread.Duplicate? It's a cross-post:
    http://forum.java.sun.com/thread.jspa?threadID=5127667
    I will also answer in that thread
    Kaj

  • I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?

    I am having mac book air 2012model i had installed mavericks and use it, i long press command and power button at a same time and i saw the command prompt, from that i had formated the total hard disk. how to i want to install the OS again ?
    i tryed with download mavericks but finally its saying a error message like cant conect to istore like that its saying and every thing is clear like internet and other stuf i tryed with 3times no progress same error pls help.. i bought this lap for my bro with his apple id only we use it now he got a new mac book pro so he gave to me so i formated and use it i use my apple id is that problem come because of changing apple id ? pls eplain

    Firstly, what is the source of the 10.6.4 disc? Is it the original installation disc for your MacBook, or one 'borrowed' from another computer?
    It isn't the retail version, because that's 10.6.3.
    Assuming it's the correct disc (i.e. the one that shipped with your Mac), you need to boot from it again.
    OK the language page.
    From the installer screen, ignore the continue button, go to the menu bar and choose Disk Utility from the Utilities menu.
    In DU, select your internal drive in the sidebar (the top item with the makers name and serial no.).
    Run Repair Disk. If that comes up as disk OK, click the partition tab. Select the partiton from the drop-down above the graphic; 1 partiton is all you need.
    Go to the options button and ensure that the partition scheme is GUID and the file system to Mac OS Extended (Journalled). Name the partiton (usually Macintosh HD), click Apply.
    When the Macintosh HD volume appears below the drive name, quit DU and see if you can then install.
    If the screen after the language screen doesn't show the menu bar, it may be necessary to use another Mac to do the job with the MB in Firewire Target Disc Mode. If it won't boot in TDM, or the MB doesn't have FireWire then it's getting very difficult.

  • How to close the main window  from Popup

    hello all,
    i need to close the main window from a popup, so i create a popup and after clicking on close button of this popup, should also the main window be closed.
    how can do this please?
    BR

    Hi
    Please go through this.. check thomas reply
    Re: Close Main Window directly on action on Pop up window
    also check this..
    how to close main window on click of a button on popup window
    cheers,
    Kris.
    Edited by: kissnas on May 12, 2011 5:06 PM

  • How to hide the command prompt

    I want to hide the command prompt as soon as the execution begins.
    please can you guide me
    thanks

    Hi,
    I tried as suggested but got the following exception :
    java.io.IOException: CreateProcess: start /B cmd /c myprogram.bat error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:551)
    at java.lang.Runtime.exec(Runtime.java:477)
    at java.lang.Runtime.exec(Runtime.java:443)
    I have the myprogram.bat file [other commands like "echo also do not work].
    The O.S is Windows 2K [it does have the start command] and I am using Jdk 1.3.1x
    Thanks !

  • How to separate the GUI interface from program execution in Labwindows?

    Hallo,
    I am trying to combine TCL interpreter with Labwindows in order to executes tcl scripts with user implemented C functions that interact with devices in Labwindows. The idea is from another hand to have the ability to control my program from GUI and in the same time to be able to execute command scripts that will take a more control on the device interface.
    I can invoke the tcl interpreter for a single command or not so complicated script. When I execute a simple loop from the script my user interface stop to respond to any messages until interpreter exits the loop.
    The question is how to separate both the GUI and the program that executes in background in my case the tcl interpreter?
    Thanks,
    Nikolai

    Probably the best solution would be to do the TCP loop in another thread. For help with multithreading programming, see the CVI Multithreading Overview (cvi\bin\MultithreadingOverview.pdf) and the multithreading example programs (cvi\samples\utility\Threading).
    Best Regards,
    Chris Matthews
    National Instruments

  • How to make the Command Prompt F7 window wider?

    The F7 command prompt history window is a gem. is there a way to make the window wider so you can see the entire command line?
    jwh

    You could ask them over here.
    http://answers.microsoft.com/en-us/windows
    http://social.technet.microsoft.com/Forums/windows/en-US/home?forum=w7itprogeneral&filter=alltypes&sort=lastpostdesc
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to close the Return Order from Billing due list

    Dear Gurus,
    This is the scenario of Free subsequent delivery with the reference of Return Delivery.
    In brief-->
    I created one sales order and done its normal delivery and billing. So this order to cash cycle is completed.
    Then due to the damage in transit of some material customer wants to return some good and ask for the subsequent delivery of same goods.
    therefore I create a return sales order with the reference of previous sales order and and do the return delivery. Here I am not making the credit note as I have to make the subsequent delivery for the return order.
    So I create the sales order for subsequent delivery with the reference of Return order and do the delivery.
    Now I have the query that when I run the billing due list (VF04) I get the same return order in billing due list as I have not created the credit memo with its reference. And the return order will remain there always. But I dont want that return order to appear in the billing due list as I have done the subsequent delivery for that return order.
    Please tell me how the return order's status can be made completed to avoid it in billing due list.
    Please suggest me all the possible solutions to complete the scenario.
    regards,
    Sanjay

    Hi,
    The SDF has to be created with refernce to the Sales Order only.
    In Brief:-
    When ever the goods are damaged in transit,generally we ask them to scrap the damaged goods and then decide what to do like
    1) Either to give a credit note to the customer for the damaged goods.
                          or
    2)Replace the Goods by SDF.
    Check me if iam wrong
    Regards
    SK

  • How to change the Command-H from hiding Photoshop to hiding Guides?

    Any suggestions?

    Your on a mac i gather?
    What version of photoshop?
    Perhaps one of these posts will help:
    http://forums.adobe.com/message/4086684
    http://blogs.adobe.com/jkost/2012/07/viewing-and-hiding-extras-in-photoshop-cs6.html

  • Call command prompt from oracle sqldeveloper

    Hi all,
        Anyone please let me know how to run the cmd prompt from oracle sql developer as like HOST command in sql plus.
    Thanks

    You can use the same HOST command. Use F5 (Run Script) to execute it. And this is a SQL and PL/SQL forum. There is a seperate SQL Developer (Not for general SQL/PLSQL questions) forum.

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • How to execute OMB scripts from the command prompt of OS

    Hi
    I want to deploy the mapping from one environment to other environment using OMB script language. But I dont want to run the OMB scripts from OMB plus COmmand prompt?
    All I need is , is there any way/scripts to access OMB command prompt from the general command prompt of the OS Machine?
    or Can I call this OMB command from java program but not JDeveloper?
    It would be a great help for me by sharing your knowledge?
    Cheers
    Pradeep

    This way from MS-DOS:
    set ORACLE_HOME=c:\oracle\OWB10gR2 (change to your Oracle Home)
    call C:\oracle\OWB10gR2\owb\bin\win32\OMBPlus.bat C:\...\my_script.tcl > C:\...\my_log.log
    my_script.tcl contains something like this:
    set OMBLOG "c:\\...\\some_kind_of.log"
    # Disconn just in case you have called a previous script
    OMBDISC
    source C:\\...\\script_with_omb_procedures.tcl
    OMBCC my_project
    OMBCONNECT CONTROL_CENTER "USER/PASSWORD@HOST:PORT:SERVICE" USE REPOSITORY 'MY_REPOSITORY_OWNER'
    OMBDCC
    DEFAULT_CONTROL_CENTER MY_CONTROL_CENTER
    proc_from_script_with_omb_procedures
    exit
    Hope this helps you to begin.
    Instead of using script_with_omb_procedures.tcl you can have your procedures directly inside my_script.tcl, but I like using a script apart to reuse my procedures.

  • How can i run application client from the command prompt ?

    Hi,
    I'm new to java & EJB. so can any body tell me the command to run the application client from the command prompt. Here is the code to print hello world:
    /* Remote interface */
    public interface Hello extends javax.ejb.EJBObject
         public String hello() throws      java.rmi.RemoteException;
    /* Home interface */
    public interface HelloHome extends javax.ejb.EJBHome
         Hello create() throws java.rmi.RemoteException, javax.ejb.CreateException;
    /* Stateless session bean class */
    public class HelloBean implements javax.ejb.SessionBean
         private javax.ejb.SessionContext ctx;
         public void ejbCreate(){
              System.out.println("ejbcreate()");
         public void ejbRemove(){
              System.out.println("ejbRemove()");
         public void ejbActivate(){
              System.out.println("ejbActivate()");
         public void ejbPassivate(){
              System.out.println("ejbejbPassivate()");
         public void setSessionContext(javax.ejb.SessionContext ctx){
              this.ctx=ctx;
         public String hello(){
              System.out.println("hello()");
              return "Hello, world!";
    /*Client class */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Properties;
    public class HelloClient
         public static void main(String[] args) throws Exception{
              Properties props=System.getProperties();
              Context ctx=new InitialContext(props);
              Object obj=ctx.lookup("HelloHome");
              HelloHome home=(HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
              Hello hello=home.create();
              System.out.println(hello.hello());
              hello.remove();
    I have stored .java files in c:\ejb
    I have successfully created the .class files using javac command in the following directory :
    c:\ejb
    I have also created Helloworld.ear file in c:\ejb using sun application server which contains the following files:
    ejb-jar-ic.jar
    app-client-ic.jar
    sun-j2ee-ri.project
    application.xml
    sun-application.xml
    Manifest.mf
    But the problem is that i'm not able to run the HelloWorld.class file successfully from the command prompt. So please suggest me the comand.
    Thanx in advance.
    Best regards,
    Pankaj

    Hi
    You can run this code from the command prompt in the same way as you run any other simple java program. The only thing is you need to set the Home and Local interfaces in the classpath.And obviously if u had deployed the bean in ur app server container, then its all over.
    And one more thing is that u need to set the provider URL in the InitialContext created in the client program.
    Thanks
    Arun B

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • Is it possible to run a java program without using the command prompt?

    Hi,
    I was wondering whether it is possible to run a Java program (not an applet) without using a command line in the command prompt?
    Basically I want to run a program that will be continually running in the background and hence I don't want to have a command prompt screen loaded up as well - I just want the program to be running in the task bar.
    I know how to run the program in the task bar - but I still need to launch the program from the command prompt - is there anyway I can get a program running without having to start it from the command prompt?
    Cheers

    Or create a desktop shortcut (in Windows) or an application launcher ( in Linux GUI).

Maybe you are looking for

  • How come my Ipod no longer plays videos?

    Hello...About a year ago I downloaded a Kelly Clarkson music video to my 5th generation ipod and it worked fine. I haven't watched it for a while but when I tried to play it today on my ipod nothing happened. (works fine on my itunes music library).

  • Editing particular pattern in an input text in ADF

    Hi, I have a requirement in ADF like the user should be able to editable only a particular pattern. Example: Name: Chandramohan Hobbies: My hobbies are {}, {}, {} In the above hobbies filed( say textarea or input text), the user should be able to rep

  • Re-organization of images Lightroom 2.7

    Greetings,  Over the years I have created a hodge podge of directories with images in various locations. I want to re-organize all my images into the single location and organization in a logical directory structure.  Now for my question.  Would I be

  • Flashing Apple icon with horizontal line flashing at random on screen

    I know this can't be good Here's the background info: Our G5 completely crashed about 4 months ago. Lost my iTunes library but my iPod mini was full and working, so I used it until the battery died. Now iTunes is reinstalled but I was scared to plug

  • How to delete picture or album in my ipad2

    I cannot figure out how to delete certain photos in my photo album..