Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.