BAT files for running Java programs in windows without dos windows

Source: Internet
Author: User

The key points to solve this problem are:

TheJavaw
Command is identicalJava
, Memory T
ThatJavaw
There is no associated Console window.
UseJavaw
When you don't want a command prompt window
Appear.Javaw
Launcher will, however, display
Dialog Box with error information if a launch fails for some
Reason.

See http://java.sun.com/javase/6/docs/javastes/tools/windows/java.html.

 

In the bat script, we generally use commands similar to the following to execute a JavaProgram:
@ Java-CP...; ../lib/log4j-1.2.15.jar com. A. B. C. d
Or:
@ Java-jar X. Jar
In this case, the loaded DOS window appears until you close the Java program. As described above.

To avoid this DOS window, you need to change the startup name in. BAT:
@ Start javaw com. A. B. C. d
Or:
@ Start javaw-jar X. Jar
You can.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.