Results 1 to 3 of 3
- 03-23-2011, 04:01 PM #1
Member
- Join Date
- May 2010
- Posts
- 24
- Rep Power
- 0
start/compile java from .bat batch file
Hi,
I created the following .bat file
The divide.java file is located into the same directory as the .bat file.Java Code:cmd javac divide.java java divide
But it doesn't compile nor it execute the java file, I just get the cmd open, the working directory set, but I still have to type manualy:
javac divide.java and java divide and then it works
The point is to easy and fast compile and run java code from command line, not using IDE, for an educational purpose
So, what is the problem here?
Best RegardsLast edited by emosms; 03-23-2011 at 04:03 PM.
- 03-23-2011, 04:18 PM #2
Member
- Join Date
- Mar 2011
- Posts
- 94
- Rep Power
- 0
I think maybe the cmd window is disappearing on you. Modify your batch file:
..and try again.Java Code:javac divide.java java divide [B]pause[/B]
- 03-23-2011, 04:34 PM #3
Member
- Join Date
- May 2010
- Posts
- 24
- Rep Power
- 0
Similar Threads
-
Help with .bat batch file problem
By Java_Mad in forum New To JavaReplies: 2Last Post: 11-03-2010, 01:52 PM -
Batch file to Run Java application
By nitishlnt in forum EclipseReplies: 1Last Post: 10-24-2008, 07:46 PM -
eclipse batch file
By doug99 in forum EclipseReplies: 6Last Post: 04-24-2008, 02:59 PM -
Help with Java Compile File
By baltimore in forum New To JavaReplies: 1Last Post: 08-06-2007, 07:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks