Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run asadmin start-domain it launches glassfish in a new command prompt window. I want to launch it from the same window I launch the command from. The idea is I want to launch GF3 from a Console2 tab and leave it running there rather than having multiple GF cmd windows.

share|improve this question
    
Are you launching it from an actual command prompt or a GF console window? – Bali C Feb 5 '13 at 9:34
    
Actual command prompt. Actually its a batch file with the commands to set up the window environment first, but calling the batch file is like type the commands manually. – edwardmlyte Feb 5 '13 at 10:13
    
Ok, as long as it's a real cmd then see my answer. – Bali C Feb 5 '13 at 10:16
    
you can use nohup so that even were you to close the window or log out, the command, start-domain, would still be running and glassfish would stay up. – Thufir Nov 1 '14 at 19:44
up vote 2 down vote accepted

To start a console app in the same cmd window as the batch file you can use call

call asadmin start-domain

Which will run the console app and then return to the batch file, without creating a new window.

You can also start it off in it's own thread so to speak, and also in the same window

start /b asadmin start-domain

call is generally better, but it's up to you.

share|improve this answer
    
Perfect. Thanks. – edwardmlyte Feb 5 '13 at 14:05
    
Great, no worries. – Bali C Feb 5 '13 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .