Cheap Loan | Payday Loan | Home Loan | Loans | Bad Credit Mortgages
Closing Batch files [Archive] - PCMech Forums

PDA

View Full Version : Closing Batch files


Floppyman
05-01-2004, 01:37 PM
Hi all,

I need some help to get a batch file to close automatically once the program is launched. Here's the file:

@ECHO OFF
ECHO "This will launch the Myprogram Client."

CD C: \ProgramFiles\Myprogram\Client\
java -jar client.jar

Now once the JAR file launches the DOS windows stays open. I've tried to remedy this by entering @ECHO OFF followed by CLS, but the window still stays open. It seems that once the JAR file opens the Batch file will not want to on to the next line. Any ideas of this, or any other ideas how I can get the DOS window to close? TIA.

aym
05-03-2004, 03:44 PM
Hi Floppyman,

Use javaw instead of java.

Floppyman
05-08-2004, 01:46 AM
Thanks for the reply aym_7. I tried your suggestion but the window still stays open (even when I instert the CLS command again). TIA.

aym
05-08-2004, 09:22 AM
Hi Floppyman,

Try this:
@ECHO OFF
ECHO "This will launch the Myprogram Client."

CD C:\ProgramFiles\Myprogram\Client\

start javaw -jar client.jar

It works under 2K/XP, not sure about 98/Me.

HTH