Hello, I want to write a Window .bat file (batch file) that executes a java program. I've written one batch file(see below), but it does not execute java program. What's wrong? reporting.bat --------------------------------------------------- copy C:\Report_Input.TXT C:\back_up_reports java TransformFile1 copy Output_file.TXT C:\back_up_reports
Run your bat from the DOS command prompt, and look at what exactly the error message says. If you can't figure it out, then report the message here. As a guess though, check your system variables. Does PATH include the directory for the java.exe file? Does CLASSPATH include the directory that has Transform1File.class? Backing up - does Transform1File.class even exist?
"I'm not back." - Bill Harding, Twister
posted 18 years ago
My batch file works finely, when executed from command line, executes the java program properly, gives no error message. But that's doesn't solve my problem. Actually, I am using an application called WebTrends log Analyzer(webtrends.com), which generates certain statical reports on websites. It gives one option called Post-processing, which allows to excute a specified .exe or .bat file just after report-generation. I am using it & want the java program TransformFile1 to be executed through the .bat file. But that doesn't happen with WebTrends Log Analyzer. ------------------ V Renu
posted 18 years ago
Thank you very much! You gave me clue to solve my problem. Actually I am using an application which allowes to run .bat files as Post-processing after a specific action. It required the CLASSPATH setting of system to modified to include the directory containin file Transform1.class. I was setting the classpath manually in only one session, when I was executing the .bat file from command line where it worked fine. But it didn't work when the application fired the execution of .bat, becoz CLASSPATH was not set. Now I changed the settings & my application is working fine. Than you again.
You can thank my dental hygienist for my untimely aliveness. So tiny:
global solutions you can do in your home or backyard