Pages

Tuesday, June 7, 2016

HOW TO CREATE A BATCH FILE FOR JAVA

Hello frinds, I am back with  new things to learning.Today i am going to tell you how to create a batch file for java.As we know that java is very famous language.Android operating system is built in java language.many people want to learn this language.most of the people compile their java program through command line.but problem of this you have to write every time command to execute your program.But now you can create a batch file to execute java program from anywhere in your computer or any other computer.
Steps to create batch file to execute java program.
Step 1:-Open the notepad
Step 2:-Type the following command.
     
     javac filename.java
     java classname
     pause

Step 3:-Save the file with extension .bat
example program1.bat
Step 3:-Now double click on this file whenever you need to execute your program.