Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

contents in the .bat file is not getting executed.

 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run a java pgm using bat file.
This .bat file is executed running a java pgm.
.bat file is called but the content in .bat file is not getting executed.
.bat file is located in C:\Program Files\apache-tomcat-6.0.16\bin

.bat is called using following code


Please help.
Thanks in advance.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure the command is not executed? exitValue() does not block; it returns immediately. waitFor() is the blocking method that returns the return code.

Before you change any code you should search for and read the Javaworld article "When Runtime.exec() won't". It's a must-read when dealing with Process(Builder).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic