starting .jar with .bat-file, and closing command window


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: starting .jar with .bat-file, and closing command window

  1. #1
    Join Date
    Apr 2008
    Location
    Switzerland
    Posts
    11

    starting .jar with .bat-file, and closing command window

    Hello

    I need to give my java application more heap, so I am using a .bat file with the command

    Code:
    start "" java -Xms100m -Xmx300m -jar "D:\my_app.jar"
    This works fine. The thing I don't like is that it opens a command window, which stays open until the java application is closed.

    Is there any way to start the java application and close the command window right away? Or is there any other possibility to achieve the increase of the heap size? A .bat file is also not so nice because it will work only on a windows machine...

  2. #2
    Join Date
    Sep 2005
    Location
    istanbul / Turkey
    Posts
    133
    you can use javaw instead of java.

  3. #3
    Join Date
    Apr 2008
    Location
    Switzerland
    Posts
    11
    Oh yes, that works fine.
    Code:
    start "" javaw -Xms100m -Xmx300m -jar "D:\my_app.jar"
    Thanks!

Similar Threads

  1. Setting a .BAT file to 'Close on Exit'? API call?
    By Chris L. in forum VB Classic
    Replies: 2
    Last Post: 07-31-2001, 12:27 PM
  2. Setting a .BAT file to 'Close on Exit'? API call?
    By Chris L. in forum VB Classic
    Replies: 0
    Last Post: 07-31-2001, 12:23 PM
  3. NullPointerException when reading text file
    By Andrew McLellan in forum Java
    Replies: 3
    Last Post: 05-09-2001, 05:34 PM
  4. Replies: 0
    Last Post: 09-02-2000, 08:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center