|
Answer» How do I execute a java file E.g TESTER.class using a batch file? Batch files are just an easy way to stack commands that you just as easily could have typed at the command line:
1. Write tester, save as tester.java
2. Compile tester.java using JAVAC creating tester.class
3. Run tester.class with java tester
Somewhere in there you might NEED to change to the JAVA directory.
Hope this helps. u execute a java file by typing at c prompt c:> java tester
to run from a batch file, open notepad, type
java tester
and save the notepad as tester.bat
Then u double CLICK tester.bat
|