Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where to place .bat file?

843841Feb 7 2005 — edited Feb 7 2005
Hi,
I have written a bat file which takes a snapshot of Database and generates a report on changes made as soon as a screen comes up in my Filter Servlet Isay some thing as

Process child = Runtime.getRuntime().exec(my_bat.bat);

but when i execute the screen I get
the following error
java.io.IOException: CreateProcess: my_bat.baterror=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)

Is it because the Tomcat is unable to locate the batch file? if yes where should I place this file. Or is there some Security problem .?
The client and server are running on same machine.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2005
Added on Feb 7 2005
2 comments
118 views