This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Calling Java Program form a batch file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Calling Java Program form a batch file" Watch "Calling Java Program form a batch file" New topic
Author

Calling Java Program form a batch file

vikram karne
Ranch Hand

Joined: Jun 05, 2007
Posts: 34
Hi

can anybody let me know how to call a java program from a batch file.
i have a folder structure like this
wsclient--->src--> TestClient -->TestClient.java

i have written this program and now i need to call this program when i click a batch file .bat
Can anybody give me a idea as how this is to be done.
any sample code to do this would be very helpful.
waiting for positive replies from your side

Thanks & Regards
Vikramk
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
You'd run a Java program from a batch file in the same way you'd run it from the command line. Be sure to get the classpath right.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling Java Program form a batch file
 
Similar Threads
How to call an executable (.exe) from java
Call servlet from batch file
help regarding batch file
Interacting with Windows command prompt
calling batch files