Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling Java Program form a batch file  RSS feed

 
vikram karne
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!