SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Non web java problem

    Now I have a bat file that starts the java program I want. The "dos" window stays open until the program closes. Is there a way to keep the program open but close that "dos" window?

    @echo off
    "C:\Program Files\JavaSoft\JRE\1.3.1\bin\javaw.exe" -cp "C:\myjarfile.jar" com.mypackage.mymainclass
    exit

  2. #2
    There can be only One.... joelwills's Avatar
    Join Date
    Jul 2000
    Location
    England
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try Using CLS instead of exit. Works for me
    Life Goggles - The Entertaining Environment Blog
    http://www.lifegoggles.com

  3. #3
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the box is still open. I can manually close it and the program still works fine, but I want to close it automatically.

  4. #4
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried running the Java.exe instead of the Javaw.exe?

    This should open without the DOS prompt!

  5. #5
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DOS prompt still opens, even with the change to java instead of javaw

  6. #6
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup the DOS window would still open...

    try changing your MS-DOS prompt properties


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •