Launching Java Programs with Batch File (Console Display)

Writing a batch file to launch Java program is relatively easy. It is useful if you need to console output something.

  • Create a new Text File
  • Type in following code :
  • java -jar "YOUR JAVA PROGRAM NAME.jar"
  • Change the file extension from “.txt” to “.bat”

Here’s how to change file extension:
http://www.mediacollege.com/microsoft/windows/extension-change.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s